negative match
memisc
0.99.26.3
Negative Match¶
Description¶
%nin%
is a convenience operator: x %nin% table
is equivalent to !(x %in%
table).
Usage¶
x %nin% table
Arguments¶
x
-
the values to be matched
table
-
a values to be match against
Value¶
A logical vector
Examples¶
x <- sample(1:6,12,replace=TRUE)
x %in% 1:3
[1] FALSE FALSE TRUE FALSE TRUE FALSE FALSE TRUE FALSE FALSE FALSE FALSE
x %nin% 1:3
[1] TRUE TRUE FALSE TRUE FALSE TRUE TRUE FALSE TRUE TRUE TRUE TRUE