title: comparing values in a row
body: <p>I am trying to compare values on data frame rows, and removing all the ones that match, with this</p>
  
  <pre><code>dat[!dat[1]==dat[2]]
  </code></pre>
  
  <p>where</p>
  
  <pre><code>&gt; dat
  </code></pre>
  
  <p>returns</p>
  
  <pre><code>n1  n2
  n1  n4
  n4  n5
  n1  n3
  n4  n4
  </code></pre>
  
  <p>So i want it to compare the values and delete the last row, since both columns have the same data. But when i use the above code, it tells me </p>
  
  <pre><code>Error in Ops.factor(left, right) : level sets of factors are different
  </code></pre>
  
  <p>the <code>str(dat)</code> reads</p>
  
  <pre><code>'data.frame':   5 obs. of  2 variables:
  $ V1: Factor w/ 2 levels "n1","n4": 1 1 2 1 2
  $ V2: Factor w/ 4 levels "n2","n3","n4",..: 1 3 4 2 3
  </code></pre>