[R] unique dates per ID

Farnoosh Sheikhi farnoosh_81 at yahoo.com
Mon Nov 14 23:38:23 CET 2016


Hi, 
I have a data set like below:
Subject<- c("2", "2", "2", "3", "3", "3", "4", "4", "5", "5", "5", "5")dates<-c("2011-01-01", "2011-01-01", "2011-01-03" ,"2011-01-04", "2011-01-05", "2011-01-06" ,"2011-01-07", "2011-01-07", "2011-01-09" ,"2011-01-10"         ,"2011-01-11" ,"2011-01-11")deps<-c("A", "B", "CC", "C", "CC", "A", "F", "DD", "A", "F", "FF", "D")df <- data.frame(Subject, dates, deps); df
I want to choose unique dates per ID in a way there are not duplicate dates per ID. I don't mind what department to pick. I really appreciate any help. Best,Farnoosh


	[[alternative HTML version deleted]]



More information about the R-help mailing list