symdiff: Symmetric set complement

View source: R/merge.R

symdiffR Documentation

Symmetric set complement

Description

Symmetric set complement

Usage

symdiff(x, y)

Arguments

x

a vector

y

a vector

Value

union(setdiff(x, y), setdiff(y, x))

Note

that symdiff(x, y) is not identical() as symdiff(y, x) without applying sort() to the result

See Also

merge_symdiff() and xor()

Examples

symdiff(c(1L, 2L, 2L), c(2L, 3L))
symdiff(c(2L, 3L), c(1L, 2L, 2L))

bit documentation built on April 4, 2025, 3:09 a.m.