match_df {plyr} | R Documentation |
This is particularly useful when you've summarised the data in some way and want to subset the original data by a characteristic of the subset.
match_df(x, y, on = NULL)
x |
data frame to subset. |
y |
data frame defining matching rows. |
on |
variables to match on - by default will use all variables common to both data frames. |
a data frame
join
to combine the columns from both x and
y
longterm <- subset(count(baseball, "id"), freq > 25) bb_longterm <- match_df(baseball, longterm)