Select rows matching any column present in another data.frame
Source:R/utils_dplyr.R
filter_by_union.Rd
Select values from a data.frame df matching any column from another data.frame or a selection of row indices. If a second data frame and a selection of rows is provided, values from df matching any value in df2[rows, ] are returned. If only rows indices are provided, rows matching any value in df[rows, ] are returned. NAs are not matched.
This is a wrapper around dplyr::filter with if_any for the case where the value should be in a reference set, with the option to choose whether to use another data frame or a subset of rows as the reference.