notin: Convenience operator for checking if an example is not in a...

notinR Documentation

Convenience operator for checking if an example is not in a set of elements

Description

Check whether an object is absent from a table, i.e., the logical inverse of in.

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

Logical vector, TRUE for each element of x absent from table, and FALSE for each element of x present in table.

See Also

match, chmatch

Examples

  11 %notin% 1:10 # TRUE
  "a" %notin% c("a", "b") # FALSE

Rdatatable/data.table documentation built on July 21, 2022, 10:05 p.m.