Skip to contents

The opposite of %in%.

Usage

lhs %notin% rhs

Arguments

lhs

A vector.

rhs

A vector.

Value

A logical vector with the same length as lhs.

Examples

a <- c(1, 2, 3)
b <- c(1, 2)

# logical vector
a %notin% b
#> [1] FALSE FALSE  TRUE

# equivalent to
!(a %in% b)
#> [1] FALSE FALSE  TRUE