%notin% | R Documentation |
Determine if an element is not present inside of a set. In particular,
this function checks to see if x
is not in table
.
x %notin% table
x |
vector or |
table |
vector or |
This operator is a modified version of the %in%
function.
A logical vector of TRUE
or FALSE
that indicates if a match was
not found for each element of x
.
%in%
# Returns TRUE as 2 is not found in the vector c(3, 4)
2 %notin% c(3, 4)
# Returns FALSE as 2 is found in the vector c(1, 2)
2 %notin% c(1, 2)
# Vectorized variant that contains FALSE and TRUE
c(1, 2) %notin% c(2, 3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.