Re: [R] setdiff datframes

2012-06-25 Thread arun
"rs788018","rs788023"),V2=c("2:198257795","2:198258795","2:198265526","2:198283305")) subset(example2,!(V1 %in% example1$V1))   V1      V2 2 rs4675 2:198258795 A.K. - Original Message - From: nathalie To: r-help@

Re: [R] setdiff datframes

2012-06-25 Thread nac
thanks it works brilliantly wrote: > Hello, > > It is recomended to post data using dput(). Something like > > dput(head(DF, 20)) # or 30 > > Then, paste the output of this command in a post. > > Untested, but I think it should work: > > > # Create a logical index into 'example2' > ix <

Re: [R] setdiff datframes

2012-06-25 Thread Rui Barradas
Hello, It is recomended to post data using dput(). Something like dput(head(DF, 20)) # or 30 Then, paste the output of this command in a post. Untested, but I think it should work: # Create a logical index into 'example2' ix <- example2$V1 %in% setdiff(example2$V1,example1$V1) example2[ix,

[R] setdiff datframes

2012-06-25 Thread nathalie
hi, I have 2 files example 1 and example 2 and would like to know what is in example2 and not in example1 (attached) V1 contain data which could be in duplicated which I am using as identifiers I used setdiff(example2$V1,example1$V1) to find the identifiers which are specific to example2: [