Hi I have a problem in R that I have been trying to solve but without success. I am trying to join two tables on two variables : an ID and a date (optional) that will be common between the two tables
In SQL (and SAS PROC SQL) I am a frequent user of the "select" command and I am used to the following nomenclature : select a.*, b.c, b.y, b.z from table1 a, table2 b where a.date=b.date and a.id=b.id I tried this in R (using sqldf) but it takes waaaay too long to get the result. My data sets are >1 gb each. Is there any way this can be done by merge() or any other more "R-like" way ? I have tried making a compound variable with paste(id, as.character(date), sep="") and merge() on that but since the date more often than not is NA this doesnt seem to work. I'm a bit stuck and the documentation is of little help to me in this case. If anybody would be kind to point me in the right direction I would be grateful. Jan [[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.