title: Selecting unique rows in R
body: <p>There is a data.frame with duplicate values for the variable "Time"</p>
  
  <pre><code>&gt; data.old
               Time  Count  Direction
  1    100000630955     95          1
  2    100000637570      5          0
  3    100001330144      7          1
  4    100001330144     33          1
  5    100001331413     39          0
  6    100001331413     43          0
  7    100001334038      1          1
  8    100001357594     50          0
  </code></pre>
  
  <p>You must leave all values without duplicates. And sum the values of the variable "Count" with duplicate values, i.e.</p>
  
  <pre><code>&gt; data.new
               Time  Count  Direction
  1    100000630955     95          1
  2    100000637570      5          0
  3    100001330144     40          1
  4    100001331413     82          0
  5    100001334038      1          1
  6    100001357594     50          1
  </code></pre>
  
  <p>All I could find these unique values with the help of the command</p>
  
  <pre><code>&gt; data.old$Time[!duplicated(data.old$Time)]
     [1] 100000630955 100000637570 100001330144 100001331413 100001334038 100001357594  
  </code></pre>
  
  <p>I can do this in a loop, but maybe there is a more elegant solution</p>