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")
letters[letters %nin% unlist(strsplit("pack my box with five dozen liquor jugs", ""))]

Tmisc documentation built on Aug. 23, 2023, 1:07 a.m.