Skip to contents

Indicate if elements of a vector are not in another vector.

Usage

notIn(x, table)

x %notin% table

Arguments

x, table

Vectors.

Value

A logical vector.

Examples


x <- c('a', 'v', 'o', 'C', 'a', 'd', 'O')
y <- letters

y %notin% x
#>  [1] FALSE  TRUE  TRUE FALSE  TRUE  TRUE  TRUE  TRUE  TRUE  TRUE  TRUE  TRUE
#> [13]  TRUE  TRUE FALSE  TRUE  TRUE  TRUE  TRUE  TRUE  TRUE FALSE  TRUE  TRUE
#> [25]  TRUE  TRUE
x %notin% y
#> [1] FALSE FALSE FALSE  TRUE FALSE FALSE  TRUE