Hi! Both yy[!(yy %in% xx)] and yy[is.na(match(yy,xx))] work a treat!
Developing this topic can anyone tell me how to extract rows which are not replicated across 2 data frames. For example: z1<-c(1,2,3,4) z2<-c(5,6,7,8) zz<- data.frame(cbind(z1,z2)) x1<-c(3,4) x2<-c(7,8) xx<- data.frame(cbind(x1,x2)) so the result would be: 1 5 2 6 Using setdiff(xx,zz) I can get the replicated rows but not the unique ones, and setdiff(zz,xx) returns the all rows. Many thanks -- View this message in context: http://r.789695.n4.nabble.com/Remove-several-numbers-from-a-sequence-tp4640630p4640771.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ 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.