Plot the next symbol probability distribution associated with a particular node in a PST
# S4 method for PSTf
cplot(object, context, state, main=NULL, all=FALSE, x.by=1, y.by=0.2, by.state=FALSE, ...)
A probabilistic suffix tree, i.e., an object of class "PSTf"
as returned by the pstree
, prune
or tune
function.
character. Label of the node to plot, provided as a string where states are separated by '-', see examples.
logical. Under development.
character. Main title for the plot. By default, the title is the node label.
logical.
numeric. Interval for the ticks on the x axis (segments).
numeric. Interval for the ticks on the y axis (probability).
logical. If TRUE
, the representation of the probability distribution is done separately for each state of the alphabet.
arguments to be passed to the plot function or other graphical parameters.
Alexis Gabadinho
The cplot()
function displays a single node labelled with context
of the tree where one or mode barplots (if object
is a segmented PST) represent the probability distribution(s) stored in the node. For more details, see Gabadinho 2016.
Gabadinho, A. & Ritschard, G. (2016). Analyzing State Sequences with Probabilistic Suffix Trees: The PST R Package. Journal of Statistical Software, 72(3), pp. 1-39.
ppplot
data(s1)
s1 <- seqdef(s1)
S1 <- pstree(s1, L=3)
cplot(S1, "a-b")
Run the code above in your browser using DataLab