Skip to contents

set_union returns all elements present in any of the sets. This function is similar to Python's set.union() method.

Usage

sets_union(x, ...)

Arguments

x

A vector.

...

Additional vectors to unite with x.

Value

A set containing all unique elements from all vectors.

Examples

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