Description Usage Arguments Details Value Examples
setdiff() is not symmetric. This function returns a list with component 1 equivalent to setdiff(x, y) and component 2 equivalent to setdiff(y, x).
1 | setdiff2(x, y)
|
x |
A numeric vector |
y |
A numeric vector |
Note that unlike setdiff() THE OUTPUT MAY CONTAIN DUPLICATES. eg setdiff2(c(1,1,2), c(2, 3))[[1]] == c(1, 1) BUT setdiff(c(1, 1, 2), c(2, 3)) == 1
Additionally the inputs are NOT coerced to vectors, again, unlike setdiff
A list of length 2, with setdiff(x, y) in component 1 and setdiff(y, x) in component 2 (apart from the differences described above).
1 2 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.