check_intersection: Check Atomic Vector Intersection

Description Usage Arguments Value See Also Examples

Description

Checks that all the elements in atomic vector x intersect with those in atomic vector y.

Usage

1
2
check_intersection(x, y, all_y = FALSE, x_name = substitute(x),
  y_name = substitute(y), error = TRUE)

Arguments

x

The object to check.

y

The second atomic vector.

all_y

A flag indicating whether all the elements in y should have a match in x.

x_name

A string of the name of the object x.

y_name

A string of the name of the object y.

error

A flag indicating whether to throw an informative error or immediately generate an informative message if the check fails.

Value

An invisible copy of x (if it doesn't throw an error).

See Also

check_join

Examples

1
2
3
4
x1 <- 1:3
x2 <- 1:4
check_intersection(x1, x2)
check_intersection(x2, x1, error = FALSE)

checkr documentation built on May 1, 2019, 6:59 p.m.