Skip to contents

set_difference returns the elements in x that are not in the other sets. This function mimics the behavior of Python's set.difference() method.

Usage

sets_difference(x, ...)

Arguments

x

A vector.

...

Additional vector sets to compare against x.

Value

A vector containing elements unique to x.

Examples

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