is.subset: Check subset inclusion

is.subsetR Documentation

Check subset inclusion

Description

Determines whether one vector contains all the elements of another.

Usage

is.subset(x, y)

x %subof% y

Arguments

x

vector.

y

vector.

Details

Determines whether or not every element of x is also found in y. Returns TRUE if so, and FALSE if not.

Value

A logical of length 1.

Functions

  • %subof%: operator version

Author(s)

Robin Evans

See Also

setmatch.

Examples


is.subset(1:2, 1:3)
is.subset(1:2, 2:3)
1:2 %subof% 1:3
1:2 %subof% 2:3


rje documentation built on Nov. 12, 2022, 9:06 a.m.