R: Symmetric set complement

symdiff {bit} | R 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))

[Package bit version 4.0.4 Index]