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?
Thanks!
Mark
Mark Na [EMAIL PROTECTED] writes:
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
On Mon, 2006-08-07 at 14:05 -0600, Mark Na wrote:
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
Thanks Peter and Mark, the subset and %in% commands did the job.
For future reference, or for others reading this message, the code I
ended up using was:
third - subset(first, ID %in% second$ID)
Mark
On 8/7/06, Marc Schwartz (via MN) [EMAIL PROTECTED] wrote:
On Mon, 2006-08-07 at 14:05
Although this is probably not directly applicable to this problem
I might mention here that merge.zoo does support left and right
joins and that handles problems similar to this. z3t, z3ft,
z3tf and z3f below have times of both unioned, the times of
z2, the times of z1 and the times of both z1