match_df: Extract matching rows of a data frame.

View source: R/universal_useful.R

match_dfR Documentation

Extract matching rows of a data frame.

Description

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.

Usage

match_df(x, y, out = NULL, on = NULL, verbose = FALSE)

Arguments

x

data frame to subset.

y

data frame defining matching rows.

out

obj Of class matching the desired output. Default NULL returns a data.frame with the matching row in y. numeric() will return the matching index in y & logical() will return a matching logical index

on

variables to match on - by default will use all variables common to both data frames.

Value

tbl/dbl/lgl Depending on

See Also

plyr::match_df


yogat3ch/UU documentation built on May 31, 2024, 10:14 p.m.