title: How to create a new column that satisfy different "IF" conditions in R?
body: <p>I have a big set of data that looks like the following:</p>
  
  <pre><code>Name    SNP.x   ILMN.Strand.x   Customer.Strand.x   SNP.y   ILMN.Strand.y   Customer.Strand.y   
  exm-rs10128711  [T/C]   BOT BOT [T/C]   BOT BOT
  exm-rs10134944  [A/G]   TOP BOT NA  NA  NA  
  exm-rs10218696    NA    NA  NA [T/C] BOT TOP
  exm-rs10223421  [A/C]   TOP BOT NA  NA  NA
  </code></pre>
  
  <p>How do I create new columns "SNP","ILMN.Strand","Customer.Strand", whereby:</p>
  
  <ol>
  <li>if (SNP.x = SNP.y), then "SNP","ILMN.Strand","Customer.Strand" would be from "SNP.x","ILMN.Strand.x","Customer.Strand.x"</li>
  <li><p>if (SNP.x is not equal to SNP.y), and SNP.x is NA (missing value), then the values in the new columns should be taken from "SNP.y","ILMN.Strand.y","Customer.Strand.y"</p></li>
  <li><p>if (SNP.x is not equal to SNP.y), and SNP.y is NA (missing value), then the values in the new columns should be taken from "SNP.x","ILMN.Strand.x","Customer.Strand.x"</p></li>
  </ol>
  
  <p>Many thanks in advance! :)</p>