%!in% | R Documentation |
in
(w. grapes) operator%!in%
is used to test if elements of one vector are not present in another vector.
It is the negation of the %in%
operator. This operator returns TRUE
for elements
of x
that are not in y
.
x %!in% y
x |
A vector of values to be matched. |
y |
A vector of values to be matched against. |
A logical vector indicating if elements in x
are not present in y
.
c(1, 2, 3) %!in% c(2, 4, 6)
# [1] TRUE FALSE TRUE
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.