title: In R, how can I take a subset of columns of a data frame and then eliminate duplicate rows?
body: <p>Imagine I have a data frame with data like this:</p>
  
  <pre><code> A | B | C
  ---+---+---
   1 | 2 | a
   1 | 2 | b
   5 | 5 | a
   5 | 5 | b
  </code></pre>
  
  <p>I want to take only columns A and B, and I want to remove any rows that have become duplicates as a result of eliminating all other columns (that is, column C). So my desied result for the table above would be:</p>
  
  <pre><code> A | B
  ---+---
   1 | 2 
   5 | 5 
  </code></pre>
  
  <p>What is the best way to do this?</p>