nin: Find Matching (or Non-Matching) Elements

Description Usage Arguments Value See Also Examples

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

1
x %nin% table

Arguments

x

a vector (numeric, character, factor)

table

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

Value

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

See Also

match %in%

Examples

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

Example output

Loading required package: lattice
Loading required package: survival
Loading required package: Formula
Loading required package: ggplot2

Attaching package: 'Hmisc'

The following objects are masked from 'package:base':

    format.pval, round.POSIXt, trunc.POSIXt, units

[1] FALSE FALSE  TRUE

Hmisc documentation built on May 30, 2017, 8:23 a.m.

Related to nin in Hmisc...