title: Write an R function which takes two words as arguments/inputs
body: <p>I would like to write an R function which takes two words as arguments/inputs and returns “Equal Length” if the number of characters are equal in two words and “Not Equal Length” otherwise. Suppose the name of the function is compare. I would like it to work as below</p>
  
  <pre><code>compare("EPS568","Summer")
  Equal Length
  compare("EPS568","SummerA")
  Not Equal Length
  </code></pre>
  
  <p>I have started with -</p>
  
  <pre><code>compares &lt;- function(A,B) {
  if (str_length(A) == str_length(B))
  return("Equal Length")
  }
  </code></pre>
  
  <p>I am learning R and any help would be appreciated</p>