nin: %nin%

Description Usage Arguments Details Value Author(s) Examples

Description

Convenience 'not-in' operator

Usage

1
x %nin% y

Arguments

x

vector of items

y

vector of all values

Details

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

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

socviz documentation built on July 1, 2020, 7:04 p.m.