.in. {Hmisc}R Documentation

Find Matching (or Non-Matching) Elements

Description

For two vectors or scalars a and b, %nin% returns TRUE if the element in a is not in b.

Usage

a %nin% b

Arguments

a a vector (numeric, character, factor)
b a vector (numeric, character, factor), matching the mode of a

Value

vector of logical values with length equal to length of a.

See Also

match

Examples

c('a','b','c') 

[Package Hmisc version 3.0-6 Index]