mrg | R Documentation |
The function merges posets defined through a list of incidence matrices or a list of complete orders between the variables (argument lst
). In the second case the variables must be defined (argument varmod
or varlen
).
mrg(
lst,
varmod = lapply(as.list(varlen), function(x) 1:x),
varlen = sapply(varmod, length)
)
## S3 method for class 'incidence'
mrg(lst, varmod = NULL, varlen = NULL)
## S3 method for class 'character'
mrg(
lst,
varmod = lapply(as.list(varlen), function(x) 1:x),
varlen = sapply(varmod, length)
)
lst |
a list of incidence matrices (class |
varmod |
list of variables and their grades. See details. |
varlen |
a vector of number of grades of each variable. See details. |
For efficiency reasons, the argument lst
can be also a list of vectors of characters. In this case, each vector lists the names of the variables in increasing order.
The list varmod
and the vector varlen
must be named, so as to identify the variables they refer to. The profiles are generated by the combinations of the variables grades. The names of the profiles are the grades of the variables concatenated, according to variables order in varmod
/varlen
. See var2prof
for more details about these arguments.
an object of S3 class incidence
.
Alberto Arcagni
var2prof
, LE2incidence
# Example with lst as list of incidence matrices
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)
mrg(lstZeta)
# Example with lst as list of characters
Lambda <- getlambda(A < B, C < D)
lst <- LE(Lambda)
vl <- c(A = 2, B = 2, C = 2, D = 2)
Zeta <- mrg(lst, varlen = vl)
plot(Zeta)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.