Learn R Programming

Kmisc (version 0.5.0)

value_matching: Value Matching

Description

These are a couple of mostly self-explanatory wrappers around %in%.

Usage

x %nin% y
x %kin% y
x %knin% y

Arguments

x
Vector or NULL: the values to be matched.
y
Vector or NULL: the values to be matched against.

Details

%nin% returns a logical vector indicating if there is no match for its left operand. It is the inverse of x %in% y.

%kin% returns the actual values of x for which x %in% y.

%knin% returns the actual values of x for which x %nin% y.