title: Filter duplicated rows in R data.frame
body: <p>I  have a data.frame as shown below. </p>
  
  <pre><code>&gt; df2 &lt;- data.frame("StudentId" = c(1,1,1,2,2,3,3), "Subject" = c("Maths", "Maths", "English","Maths", "English", "Science", "Science"), "Score" = c(100,90,80,70, 60,20,10))
  &gt; df2
    StudentId Subject Score
  1         1   Maths   100
  2         1   Maths    90
  3         1 English    80
  4         2   Maths    70
  5         2 English    60
  6         3 Science    20
  7         3 Science    10
  </code></pre>
  
  <p>Few StudentIds, have duplicated values for column Subject (example: ID 1 has 2 entries for "Maths". I need to keep only the first one of the duplicated rows.
  The expected data.frame is:</p>
  
  <pre><code>  StudentId Subject Score
  1         1   Maths   100
  3         1 English    80
  4         2   Maths    70
  5         2 English    60
  6         3 Science    20
  </code></pre>
  
  <p>I am not able to do this.
  Any ideas.</p>