Hmisc (version 3.0-1)

.in.: 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

Run this code
c('a','b','c')

Run the code above in your browser using DataCamp Workspace