0

My data has two columns:

id <-c(1, 2, 2, 3, 3, 3, 3)
dates <-c("1/1/2001", "2/1/2001", "2/1/2001", "3/1/2001", "4/1/2001", "4/1/2001", "5/1/2001")
example<-data.frame(id, dates)

I want to find the unique/distinct id and then find all unique dates for that id in the dates column. In the example, I would have 3 unique IDs and for each id a different number of unique dates.

Rizwan
  • 27
  • 5

0 Answers0