Hi Guys

I have two data frames which I would like to merge on two conditions.

I am doing the following  (abstract form)

new.data.frame <- merge(df1,df2, by=c("Col1","Col2"))

It is giving me a null result.

Basically I need to apply two conditions.

I also tried sqldf but it is running forever. Will indexing help ?

temp <- sqldf("select a.chr,a.SNP,a.snp_qual,a.rms_qual,a.depth,b.rsid FROM
+ data_lane6_snps a,
+ data_lane6_snps_rsid b
+ WHERE
+ a.SNP = b.SNP
+ AND
+ a.chr = b.chr
+ ")

Thanks!
-Abhi

        [[alternative HTML version deleted]]

______________________________________________
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