Skip to contents

Flag Rows Whose Key Occurs in Another Table

Usage

PlotDataMembership(data, reference, by, into = "member", negate = FALSE)

Arguments

data

A data frame.

reference

A data frame.

by

Key columns (same names in both tables).

into

Name of the new logical column.

negate

If TRUE, flag rows whose key does not occur.

Value

data with the logical column.

Examples

PlotDataMembership(data.frame(id = c("a", "b")), data.frame(id = "a"), "id",
                   into = "excluded", negate = TRUE)
#>   id excluded
#> 1  a    FALSE
#> 2  b     TRUE