%nin%
Convenience 'not-in' operator
x %nin% y
x
: vector of itemsy
: vector of all valueslogical vecotor of items in x not in y
Complement of the built-in operator %in%
. Returns the elements of x
that are not in y
.
fruit <- c("apples", "oranges", "banana") "apples" %nin% fruit "pears" %nin% fruit
Kieran Healy