title: Removing duplicated observations in r with restriction
body: <p>I have a dataset with which contains duplicates of the ident variable.
  I need to select only 1 observation of each ident and it needs to be the newest value, i.e. the resulting data should contain the observation for the ident where the 'year' is the highest in the initial data set.</p>
  
  <p>I believe a general case would look like this:</p>
  
  <pre><code>1. ident   value   year
   2. A       1       19X1
   3. A       2       19X2
   4. B       4       19X2
   5. B       2       19X1
   6. B       1       19X3
   7. C       1       19X4
   8. C       2       19X1
  </code></pre>
  
  <p>(I could not order it in a proper table here, so please disregard the numbered list on the left)</p>
  
  <p>Only, I have several hundred thousands obs.</p>
  
  <p>Order of the resulting data set is not important to me.</p>