notIn: Not in

Description Usage Arguments Details Value Examples

View source: R/notIn.R

Description

Determine if values in the first argument don't exist in the second argument.

Usage

1
2
3
x %nin% y

notIn(x, y)

Arguments

x

Vector or NULL: the values to be matched.

y

Vector or NULL: the values to be matched against.

Details

%nin% is the functional inverse of %in%.

lhs %nin% rhs is equivalent to notIn(lhs, rhs).

Value

A logical vector of the same length as x.

For every element in x, return FALSE if the value exists in y, and TRUE otherwise.

Examples

1
2
3
4
"a" %nin% letters
"a" %nin% LETTERS
c("a", "A") %nin% letters
notIn("A", letters)

daattali/rsalad documentation built on Oct. 28, 2019, 12:16 p.m.