vlmctree {VLMC} | R Documentation |
Compute the tree representation of a "vlmc"
object as R
list
.
vlmctree(x) ## S3 method for class 'vtree' str(object, ...) .vvec2tree(vv, k, chk.lev)
x,object |
typically the result of |
vv |
integer vector encoding the fitted vlmc, typically
|
k |
integer, the alphabet size. |
chk.lev |
integer internally used for consistency checking. |
... |
further arguments passed to or from methods. |
.vvec2tree
is the internal (recursive) function building up the
tree.
str.vtree
is a method for the generic str
function and typically for the output of vlmctree()
. For each
node, it gives the “parenting level” in braces and the counts.
A list
of class
"vtree"
representing the tree structure recursively.
Each “node” of the tree is itself a list with components
level |
length-2 integer giving the level in {0,1,...},
counted from the root (which is |
count |
integer vector of length |
total |
equals to |
child |
a list (of length |
Martin Maechler
vlmc
.
data(presidents) dpres <- cut(presidents, c(0,45,70, 100)) # three values + NA table(dpres <- factor(dpres, exclude = NULL)) # NA as 4th level (vlmc.prc1 <- vlmc(dpres, cut = 1, debug = TRUE)) str(vv.prc1 <- vlmctree(vlmc.prc1))