I need to merge three datasets and don't know how. If I were using SQL, I would use df3, look up the characteristics of each date in df1 and the value for each observation in df2.
df1 - unique list of Dates and characteristics of those dates Date, YYYYMM, YYYYWW, DOW df2 - the raw data Date, Place, Value df3 - all posibile combinations of Date + Place (via expand.grid(unique(df2$Date),unique(df2$Place)) Date, Place I need to end up with: Date, YYYYMM, YYYYWW, DOW, PLace, Value (plug 0 if combo doesn't exist in raw data). Appreciate any help! -- View this message in context: http://n4.nabble.com/Question-on-Merge-Lookup-tp1112384p1112384.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.