notin: Boolean operator "not in"

%notin%R Documentation

Boolean operator "not in"

Description

Negation of the %in% operator, see ?match. %notin% is the negation of %in%, which returns a logical vector indicating if there is a non-match or not for its left operand.

Usage

x %notin% table

Arguments

x

vector or NULL: the values to be matched.

table

vector or NULL: the values to be matched against.

Value

A logical vector, indicating if a non-match was located for each element of x: thus the values are TRUE or FALSE and never NA.

Examples

"a" %notin% letters
"a" %notin% LETTERS
c("a", "A") %notin% letters
letters %notin% c("a", "b", "c")

erikerhardt/erikmisc documentation built on April 17, 2025, 10:48 a.m.