title: Return names after comparing many vectors in R
body: <pre><code>    Col1  Col2  Col3  Col4
  R1  A     B     B     A
  R2  D     D     NA    D
  R3  E     E     E     E
  R4  K     NA    NA   NA
  R5  U     U     U    NA
  R6  Z     Y     Y    Y
  </code></pre>
  
  <p>I would like to return the names of {R2,R3,R4,R5} because all the columns match within the row or are NA. In the real dataset there will be hundreds of columns.</p>
  
  <p>I have found this piece of code semi-useful (let's say this is a data frame called 'dat'):</p>
  
  <pre><code>all.equal(dat[5,],dat[6,])
  </code></pre>
  
  <p>But that only returns the columns are mismatched rows (and it only does it for 2 rows).</p>