powered by
Check whether an object is absent from a table, i.e., the logical inverse of in. See examples on how missing values are being handled.
in
x %notin% table
Logical vector, TRUE for each element of x
TRUE
x
absent from table, and FALSE for each element of x
table
FALSE
present in table.
Vector or NULL: the values to be matched.
NULL
Vector or NULL: the values to be matched against.
match, chmatch
match
chmatch
11 %notin% 1:10 # TRUE "a" %notin% c("a", "b") # FALSE ## NAs on the LHS NA %in% 1:2 NA %notin% 1:2 ## NAs on the RHS NA %in% c(1:2,NA) NA %notin% c(1:2,NA)
Run the code above in your browser using DataLab