trotter (version 0.6)

sspv: Subsets Pseudo-Vector Constructor

Description

The SSPV class defines a pseudo-vector containing all the arranged subsets of the objects stored in items. The function sspv is a constructor for this class.

Usage

sspv(items)

Arguments

items
a vector of objects to be subsetted.

Value

an instance of SSPV.

Details

The subsets are arranged according to the order in which the objects appear in items. The first subset, containing none of the objects, is NULL.

See Also

Permutations Pseudo-Vector ppv

Combinations Pseudo-Vector cpv

Amalgams Pseudo-Vector apv

Selections Pseudo-Vector spv

Examples

Run this code
# create a pseudo-vector of subsets from the first 15 letters
ss <- sspv(letters[1:15])
# generate a description
print(ss)
# compatable with length
length(ss)
# inspect a few of the combinations "stored" in ss
ss[1]
ss[1000]
ss[32768]

Run the code above in your browser using DataLab