title: Remove duplicate by row(only the same columns)
body: <p>I know there are many ways, but they are not suitable for my requirements.</p>
  
  <p>I found unique, duplicated, distinct, but these seem to be compared to other columns/rows.</p>
  
  <p>What I want is two data comparisons of the same columns.</p>
  
  <pre><code>DT &lt;- data.table(first=c("A","A","A","B","B","C","D"),
                second=c("A","B","D","B","D","C","A"),
                value=c(90,47,189,72,42,86,280))
  </code></pre>
  
  <p>I want to find the value of first and the value of second. If they are the same, delete them (only the same columns)</p>
  
  <p>output:</p>
  
  <pre><code>     first second value
   1     A      B     47
   2     A      D    189
   3     B      D     42
   4     D      A    280
  </code></pre>
  
  <p>I use these methods and just return the same data</p>
  
  <pre><code>DT &lt;- unique(DT, by=c('first','second'))
  DT &lt;- DT[!duplicated(DT[,c("first","second")]),]
  DT &lt;- distinct(DT, first, second, .keep_all= TRUE)
  </code></pre>
  
  <p>Maybe the method is simple? It’s just that I think it’s too complicated.</p>