setdiff_symmetric: Find which elements are not shared between two sets

View source: R/main.R

setdiff_symmetricR Documentation

Find which elements are not shared between two sets

Description

The base setdiff(vec1, vec2) function is asymmetric in the sense that it returns elements of vec1 that are not found within vec2, but it does not perform the reverse comparison. In contrast, setdiff_symmetric(vec1, vec2) is symmetric in that it returns any elements that are found in one vector but not the other.

Usage

setdiff_symmetric(x, y)

Arguments

x, y

vectors (of the same mode) containing a sequence of items.


bobverity/bobfunctions2 documentation built on July 4, 2023, 8:55 p.m.