Skip to contents

set_issubset checks if all elements of x are in y. This function is similar to Python's set.issubset() method.

Usage

sets_issubset(x, y)

Arguments

x

A vector.

y

Another vector to compare with.

Value

TRUE if x is a subset of y, otherwise FALSE.

Examples

sets_issubset(c(1, 2), c(1, 2, 3))
#> [1] TRUE