Learn R Programming

dst (version 1.8.0)

ttmatrix: Construct a description matrix from a list of subsets names.

Description

Construct a description matrix from a list of subsets names.

Usage

ttmatrix(x, sparse = "no")

Value

ttmat A corresponding logical description matrix

Arguments

x

A list of names

sparse

= c("yes","no") whether to use sparse matrix. Default = "no".

Author

Claude Boivin

Examples

Run this code
subsets_names <- list(c("b", "c"), "b", c("a", "b", "c"))
ttmatrix(subsets_names)
znames <- list("empty", "a", c("b", "c"), c("a", "b"), c("a", "b", "c") )
print(ttmatrix(znames) )
print(ttmatrix(znames, sparse = "yes") )

Run the code above in your browser using DataLab