I know I can use the plyr and its friends to combine dataframes, and merge as well, but so far I don’t know how to merge two dataframes with multiple columns based on 2 columns?
I know I can use the plyr and its friends to combine dataframes, and
Share
See the documentation on
?merge, which states:This clearly implies that
mergewill merge data frames based on more than one column. From the final example given in the documentation:This example was meant to demonstrate the use of
incomparables, but it illustrates merging using multiple columns as well. You can also specify separate columns in each ofxandyusingby.xandby.y.