Given vectors A and B, returns only the entities from vector A that don't occur in vector B.

x %not_in% table

Arguments

x

The vector you want to check.

table

Table in which to do lookups against x.

Value

Same form of return as %in% — except it will return only elements on the lhs that aren't present on the rhs

Examples

c(1, 2, 3, 4, 5) %not_in% c(4, 5, 6, 7, 8)
#> [1] TRUE TRUE TRUE FALSE FALSE