I want to eliminate rows that are repited in COD but only those who have a diference in time less than 5 minutes, for example. And I want that one row of the repited COD which satisfy the condition remains. I would like that remain the last one. IF I have this data:
  COD  |   Time               | score   | position |
-------|----------------------|---------|----------|
  xx4  | 2016-07-19 10:15:30  |5452     |  2454    |
  xf5  | 2016-07-19 09:23:30  |5321     |  342     |
  xr1  | 2016-07-19 12:15:30  |5232     |  2328    |
  xx4  | 2016-07-19 11:20:20  |1322     |  2432    |
  xx4  | 2016-07-19 10:18:30  |2344     |  2534    |
  xr1  | 2016-07-19 12:17:30  |8676     |  4566    |
  xx4  | 2016-07-19 10:15:50  |9445     |  7655    |
The result i looking for:
  COD  |   Time               | score   | position |
-------|----------------------|---------|----------|
  xx4  | 2016-07-19 10:15:30  |5452     |  2454    |
  xf5  | 2016-07-19 09:23:30  |5321     |  342     |
  xr1  | 2016-07-19 12:15:30  |5232     |  2328    |
  xx4  | 2016-07-19 11:20:20  |1322     |  2432    |
The time is in format POSIXct .How can I do this in R?
 
     
    