Learn R Programming

parsec (version 1.2.7)

LE2incidence: Computes the incidence matrices of lexicographic linear extensions of a profile poset.

Description

The function generates the incidence matrices of the lexicographic linear extensions of a profile poset, given the variables (argument varmod or varlen) and a list of complete orders on them (argument lst).

Usage

LE2incidence(
    lst,
    varmod = lapply(as.list(varlen), function(lst) 1:lst),
    varlen = sapply(varmod, length)
)
# S3 method for default
LE2incidence(
    lst,
    varmod = lapply(as.list(varlen), function(lst) 1:lst),
    varlen = sapply(varmod, length)
)
# S3 method for list
LE2incidence(
    lst,
    varmod = lapply(as.list(varlen), function(x) 1:x),
    varlen = sapply(varmod, length)
)

Value

an object of S3 class incidence or a list of objects of S3 class incidence.

Arguments

lst

a vector of characters, or a list of specifies the names of the variables in increasing order. See details.

varmod

list of variables and their grades. See details.

varlen

a vector with the number of grades of each variable. See details.

Author

Alberto Arcagni

Details

Argument lst is a list of chracter vectors. Each vector lists variable names in increasing order.

List varmod and vector varlen must be named so as to identify the variables they refer to. Profiles are generated as combinations of the variables' grades. The names of the profiles are the grades of the variables concatenated, after the variables order in varmod/varlen. See var2prof for more details about these arguments.

See Also

var2prof

Examples

Run this code
Lambda <- getlambda(A < B, C < D)
plot(Lambda)
lst <- LE(Lambda)
vl <- c(A = 2, B = 2, C = 2, D = 2)
lstZeta <- LE2incidence(lst, varlen = vl)
for (x in lstZeta)
    plot(x)

Run the code above in your browser using DataLab