nin: %nin%

Description Usage Arguments Value Author(s) Examples

Description

Convenience not-in operator Complement of the built-in operator %in%. Returns the elements of x that are not in y.

Usage

1
x %nin% y

Arguments

x

vector of items

y

vector of all values

Value

logical vecotor of items in x not in y

Author(s)

Kieran Healy

Examples

1
2
3
fruit <- c("apples", "oranges", "banana")
"apples" %nin% fruit
"pears" %nin% fruit

kjhealy/socviz documentation built on April 22, 2018, 7:13 p.m.