grapes-notin-grapes: Negation of %in% Operator

Description Usage Arguments Value Examples

Description

R lacks a negation of the %in% operator. While you can negate the whole expression, that solution results in less readable and clear code.

Usage

1
x %notin% table

Arguments

x

Vector. The values to be matched

table

Vector. The values to be matched against.

Value

A logical vector of same length as x. TRUE means the respective value was found in table.

Examples

1
c("a", "ab") %notin% letters

STAT-UP/statupinternal documentation built on May 9, 2019, 11:43 a.m.