not_in: Negation of %in%

Description Usage Arguments Details Value Examples

Description

Provides a "not in" like in Python by negating %in%.

Usage

1
a %!in% b

Arguments

a

The values to be matched.

b

The values to be matched against.

Details

In my opinion this is prettier and more readable than using !x %in% y. By the way, this notation works without parentheses because %in% takes precedence before !, see Syntax.

Value

The negated output of %in%.

Examples

1
42 %!in% 1:10  # TRUE

BastiHz/BastiHzR documentation built on March 24, 2021, 1:48 p.m.