%not_in% <- function(a,b){ ! a %in% b }

a %not_in% b

Arguments

a

vector or NULL: the values to be matched.

b

vector or NULL: the values to be matched against.

Value

A logical vector, indicating if a match was not located for each element of a. The values are TRUE or FALSE and never NA.

Examples

1:5 %not_in% 3:5
#> [1] TRUE TRUE FALSE FALSE FALSE