symdiff | R Documentation |
Performs symmetric(!) set difference in contrast
to setdiff
. I.e. given two vectors (of the same mode) the result
contains all elements that are either in the first or the second vector
but not in both. Duplicated values in the arguments will be discarded.
symdiff(x, y)
x |
[ |
y |
[ |
A vector with elements of the symmetric difference of y
and y
.
symdiff(1:10, 6:15)
symdiff(1:10, 1:20)
symdiff(c("a", "b", "c"), c("d", "c", "c", "d", "e"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.