Test set relations among two vectors.

pool(x, y)

Arguments

x

vector

y

vector

Details

The two vectors are tested for elements unique to x, unique to y, and common to both.

Note

If length of x is zero, it is returned unmodified. If length of rule is zero, value is all NA.

Author

Tim Bergsma

Examples

pool(letters[1:5], letters[4:8])
#> $x
#> [1] "a" "b" "c"
#> 
#> $y
#> [1] "f" "g" "h"
#> 
#> $both
#> [1] "d" "e"
#>