[R] Query about using setdiff

lalitha viswanath lalithaviswanath at yahoo.com
Wed Mar 7 20:41:56 CET 2007


Hi
I have two dataframes
names(DF1) = c("id", "val1", "val2");

names(DF2) = c("id2");

Ids in DF2 are a complete subset of those in DF1

How can I extract entries from DF1 where id NOT IN
DF2.

I tried setdiff(DF1, DF2); setdiff(DF1$id, DF2$id),
etc.
Although the latter eliminates the ids as required, I
dont know how to extract val1 and val2 for the
resultant set.


Thanks
Lalitha 


 
____________________________________________________________________________________
8:00? 8:25? 8:40? Find a flick in no time



More information about the R-help mailing list