title: How do I test if three variables are equal [R]
body: <p>I'm trying to do if else statement which includes a condition if three variables in the data frame equal each other. </p>
  
  <p>I was hoping to use the identical function but not sure whether this works for three variables.  </p>
  
  <p>I've also used the following but R doesn't seem to like this:</p>
  
  <pre><code>geno$VarMatch  &lt;- ifelse((geno[c(1)] != '' &amp; geno[c(2)] != '' &amp; geno[c(3)] != '') 
  &amp; (geno[c(5)] == geno[c(4)] == geno[c(6)]), 'Not Important', 'Important')
  </code></pre>
  
  <p>Keeps telling me:</p>
  
  <pre><code>Error: unexpected '==' 
  </code></pre>
  
  <p>Am I supposed to specify something as data.frame/vector etc...  Coming from an SPSS stand point, I'm slightly confused. </p>
  
  <p>Sorry for the simplistic query. </p>