grapes-nin-grapes: x not in y

%nin%R Documentation

x not in y

Description

Returns a logical vector of elements of x that are not in y.

Usage

x %nin% table

Arguments

x

a vector (numeric, character, factor)

table

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

Value

A logical vector with length equal to x of things in x that aren't in y.

See Also

%like%, %nlike%, %nin%,

Examples

1:10 %nin% seq(from=2, to=10, by=2)
c("a", "b", "c") %nin% c("a", "b")

stephenturner/Tmisc documentation built on April 21, 2024, 8:31 a.m.