The not-in operator for R.

x %nin% table

Arguments

x

vector or NULL: the values to be matched.

table

vector or NULL: the values to be matched against.

Value

The negation of %in%.

See also

Author

Raymond Moore

Examples

1 %nin% 2:10
#> [1] TRUE
c("a", "b") %nin% c("a", "c", "d")
#> [1] FALSE TRUE