Filter data based on lowest value

First of all, don't post screenshots of your data. Provide reproducible examples. It makes it easier for people to answer your question:

Here is an example of what you are after using the iris dataset. You can adapt it to your problem.

iris %>% 
  group_by(Species) %>% 
  arrange(Petal.Length) %>% 

For you, group by the PatientID, then arrange by the date or exam count.

1 Like