| sgCMatrix-class {arulesSequences} | R Documentation |
Sparse pseudo matrices in column-compressed form for storing ordered lists of symbols.
Most frequently, an object is created upon creation of an object of
class sequences or
sequencerules.
Objects can also be created by calls of the form
new("sgCMatrix", ...).
p:i, i.e. to the first element of a list. However, note that
the last element contains the number of elements of i.i:Dim:Dimnames:factors:coercesignature(from = "sgCMatrix", to = "list")coercesignature(from = "list", to = "sgCMatrix")coercesignature(from = "ngCMatrix", to = "sgCMatrix")dimsignature(x = "sgCMatrix")dimnamessignature(x = "sgCMatrix")dimnames<-signature(x = "sgCMatrix", value = "ANY")showsignature(x = "sgCMatrix")
The number of rows can be larger than the number of symbols actually
occurring. Thus i need not be recoded upon subsetting or two
collections of lists with the same index base can be easily combined
(column or row-wise).
Many of the methods of this class implemented in C are currently not interfaced as R methods.
Christian Buchta
Class
sequences,
timedsequences,
sequencerules.
## 3 example sequences
x <- list("01" = list(c("A","B"), "C"),
"02" = list("C"),
"03" = list("B", "B"))
## uses paste
s <- as(x, "sgCMatrix")
s
##
dim(s)
dimnames(s)