Skip to contents

set_intersection returns the common elements in all sets. This function mimics Python's set.intersection() method.

Usage

sets_intersection(x, ...)

Arguments

x

A vector.

...

Additional vectors to find the intersection with.

Value

A vector containing elements common to all sets.

Examples

sets_intersection(c(1, 2, 3), c(2, 3, 4), c(3, 4, 5))
#> [1] 3