View source: R/ctx_tree_draw.R
draw.ctx_tree_cpp | R Documentation |
This function 'draws' a context tree as a text.
## S3 method for class 'ctx_tree_cpp'
draw(ct, control = draw_control(), frequency = NULL, ...)
## S3 method for class 'ctx_tree'
draw(ct, control = draw_control(), frequency = NULL, ...)
ct |
a context tree. |
control |
a list of low level control parameters of the text
representation. See details and |
frequency |
this parameter controls the display of node level
information in the tree. The default |
... |
additional arguments for draw. |
The function uses basic "ascii art" to represent the context tree. Characters
used to represent the structure of the tree, e.g. branches, can be modified
using draw_control()
.
In addition to the structure of the context tree, draw
can represent
information attached to the node (contexts and partial contexts). This is
controlled by additional parameters depending on the type of the context
tree.
the context tree (invisibly).
dts_c <- sample(c("A", "B", "CD"), 100, replace = TRUE)
ctree_c <- ctx_tree(dts_c, min_size = 10, max_depth = 2)
draw(ctree_c, frequency = "total")
draw(ctree_c, frequency = "detailed")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.