%nin% {socviz} | R Documentation |
%nin%
Description
Convenience 'not-in' operator
Usage
x %nin% y
Arguments
x |
vector of items |
y |
vector of all values |
Details
Complement of the built-in operator %in%
. Returns the elements of x
that are not in y
.
Value
logical vecotor of items in x not in y
Author(s)
Kieran Healy
Examples
fruit <- c("apples", "oranges", "banana")
"apples" %nin% fruit
"pears" %nin% fruit
[Package socviz version 1.2 Index]