Extract rows for the first occurrence of a variable in a data frame
- by user2614883
I have a data frame with two variables, Date and Taxa and want to get the date for the first time each taxa occurs. There are 9 different dates and 40 different taxa in the data frame consisting of 172 rows, but my answer should only have 40 rows.
Taxa is a factor and Date is a date.
For example, my data frame (called 'species') is set up like…