%nin% {Hmisc}R Documentation

Find Matching (or Non-Matching) Elements

Description

%nin% is a binary operator, which returns a logical vector indicating if there is a match or not for its left operand. A true vector element indicates no match in left operand, false indicates a match.

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 %in%

Examples

c('a','b','c') %nin% c('a','b')

[Package Hmisc version 3.0-10 Index]