grapes-notin-grapes: Not in

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Determine if an element is not present inside of a set. In particular, this function checks to see if x is not in table.

Usage

1
x %notin% table

Arguments

x

vector or NULL: the values to be matched. Long vectors are supported.

table

vector or NULL: the values to be matched against. Long vectors are not supported.

Details

This operator is a modified version of the %in% function.

Value

A logical vector of TRUE or FALSE that indicates if a match was not found for each element of x.

Author(s)

JJB

See Also

%in%

Examples

1
2
3
4
5
6
7
8
# Returns TRUE as 2 is not found in the vector c(3, 4)
2 %notin% c(3, 4)

# Returns FALSE as 2 is found in the vector c(1, 2)
2 %notin% c(1, 2)

# Vectorized variant that contains FALSE and TRUE
c(1, 2) %notin% c(2, 3)

coatless/rops documentation built on May 13, 2019, 8:47 p.m.