Extract matching rows of a data frame.
match_df.Rd
Match works in the same way as join, but instead of return the combined dataset, it only returns the matching rows from the first dataset. 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.
Arguments
- x
data frame to subset.
- y
data frame defining matching rows.
- out
obj
Of class matching the desired output. DefaultNULL
returns adata.frame
with the matching row iny
.numeric()
will return the matching index iny
&logical()
will return a matching logical index- on
variables to match on - by default will use all variables common to both data frames.