Try this:
df[!duplicated(df[, 1:3]), ]
Jean
Dgnn wrote on 12/07/2011 08:24:01 PM:
> Hello. I am trying to remove from my dataframe, those rows in which the
first
> 7 columns are duplicated even if subsequent columns make those rows
unique.
>
> df<-data.frame(id=rep(c('amy','bob','joe') , e
Hello. I am trying to remove from my dataframe, those rows in which the first
7 columns are duplicated even if subsequent columns make those rows unique.
df<-data.frame(id=rep(c('amy','bob','joe') , each=5),
pet1=sample(LETTERS[1:3],15, replace=T),
pet2=sample(LETTERS[1:3],15, replace=T),
2 matches
Mail list logo