[R] Retain only those records from a dataframe that exist in another dataframe

Mark Na mtb954 at gmail.com
Mon Aug 7 22:05:29 CEST 2006

Dear R community,

I have two dataframes "first" and "second" which share a unique identifier.

I wish to make a new dataframe "third" retaining only the rows in
"first" which also occur in "second".

I have tried using merge but can't seem to figure it out. Any ideas?



More information about the R-help mailing list