symdiff: Symmetric set complement

Description Usage Arguments Value Note See Also Examples

View source: R/merge.R

Description

Symmetric set complement

Usage

1
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

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

bit documentation built on Aug. 4, 2020, 9:06 a.m.