I have the following data frame structure
| date | latitude |
|---|---|
| 1951-03-22 | 66.08106 |
| 1951-03-22 | 59.59117 |
| 1951-04-08 | 59.59117 |
| 1952-10-20 | 55.41972 |
| 1960-08-12 | 66.05653 |
| 1960-09-10 | 66.08106 |
What I would like to do is: select the rows for all unique latitude and if there are 2 (or more) exact same latitudes, I want to keep only the one that has the earliest date but for each year.
So, for my previous example, it would give the following subset, without only the 3rd row:
| date | latitude |
|---|---|
| 1951-03-22 | 66.08106 |
| 1951-03-22 | 59.59117 |
| 1952-10-20 | 55.41972 |
| 1960-08-12 | 66.05653 |
| 1960-09-10 | 66.08106 |
Many thanks for the help.
PS: maybe it is important to precise that class(df$date) is "Date" and class(df$latitude) is "numeric".