Learn R Programming

rje (version 1.4)

is.subset: Check subset inclusion

Description

Determines whether one vector contains all the elements of another.

Usage

is.subset(x, y)

Arguments

x
vector.
y
vector.

Value

  • A logical of length 1.

Details

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

See Also

setmatch.

Examples

Run this code
is.subset(1:2, 1:3)
is.subset(1:2, 2:3)

Run the code above in your browser using DataLab