Skip to content
Prev 11130 / 29559 Next

Help to eliminate duplicated from data.frame but Special Problem

Hi Gianni,

 From the example it seems like you want to check if value1 is 
duplicated, not Id:
 > my.df[!duplicated(my.df$value1),]
You can also remove duplicated rows based on the values of more than one 
column:
 > my.df[!duplicated(my.df[,c("Id","value1")]),]
Does any of these do what you want?

Cheers,
Jon
On 3/9/2011 3:42 PM, gianni lavaredo wrote: