%nin% {socviz} | R Documentation |
Convenience 'not-in' operator
x %nin% y
x |
vector of items |
y |
vector of all values |
Complement of the built-in operator %in%
. Returns the elements of x
that are not in y
.
logical vecotor of items in x not in y
Kieran Healy
fruit <- c("apples", "oranges", "banana")
"apples" %nin% fruit
"pears" %nin% fruit