Hi,
If I understand it correctly, you could use ?unique() or ?duplicated()
 unique(mydf)

#or

mydf[!duplicated(mydf),]


A.K.

Hello everyone. I am very new to R and very bad in programming. 
I need to remove some rows based on multiple conditions. 
For example, I have this table: 

Id = c(1,1,2,2,3,3) 
url = c("a", "b", "a", "a", "b","b") 
mydf = data.frame(Id,url) 

I want to remove the second row of url of the same Id, but keep both rows of 
url if they are different. 

Thank you very much.

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to