subsetOrder {rje}R Documentation

Compare sets for inclusion.

Description

A wrapper for is.subset which returns set inclusions.

Usage

subsetOrder(x, y)

Arguments

x

A vector.

y

A vector of the same type as x.

Details

If x is a subset of y, returns -1, for the reverse returns 1. If sets are equal or incomparable, it returns 0.

Value

A single integer, 0, -1 or 1.

Author(s)

Robin Evans

See Also

is.subset, inclusionMax.

Examples


subsetOrder(2:4, 1:4)
subsetOrder(2:4, 3:5)


[Package rje version 1.12.1 Index]