Provides the compliment to the base R %in% operator. Included here instead of via import due to stability issues with the source package, Hmsic, during original package development in October, 2017. Used under terms of Hmisc's GPL-3 License.

x %nin% y

Arguments

x

vector or NULL: the values to be matched

y

vector or NULL: the values to be matched against

Source

Hmsic

Examples

x <- 2 y <- 2 z <- 3 x %in% y
#> [1] TRUE
x %nin% y
#> [1] FALSE
x %in% z
#> [1] FALSE
x %nin% z
#> [1] TRUE