grapes_not_in_grapes: Opposite of '%in%'

Description Usage Arguments Details Examples

Description

Sometimes is nice to have a shortcut.

Usage

1
x %!in% y

Arguments

x

A vector.

y

A vector.

Details

The infix operator %in% tests whether elements in one vector are also found in another vector. To negate this test, users previously needed to wrap the whole statement in parentheses. This helps to get around this hassle.

Examples

1
v = c("a", "b", "c"); "x" %!in% v

bstaton1/StatonMisc documentation built on May 18, 2020, 12:06 a.m.