barplot.sevt {stagedtrees} | R Documentation |
Bar plots of stage probabilities
Description
Create a bar plot visualizing probabilities associated to the different stages of a variable in a staged event tree.
Usage
## S3 method for class 'sevt'
barplot(
height,
var,
ignore = height$name_unobserved,
beside = TRUE,
horiz = FALSE,
legend.text = FALSE,
col = NULL,
xlab = ifelse(horiz, "probability", NA),
ylab = ifelse(!horiz, "probability", NA),
...
)
Arguments
height |
an object of class |
var |
name of a variable in |
ignore |
vector of stages which will be ignored and left untouched,
by default the name of the unobserved stages stored in
|
beside |
a logical value. See |
horiz |
a logical value. See |
legend.text |
logical. |
col |
color mapping for the stages, see |
xlab |
a label for the x axis. |
ylab |
a label for the y axis. |
... |
additional arguments passed to |
Value
As barplot
:
A numeric vector (or matrix, when beside = TRUE),
giving the coordinates of all the bar midpoints drawn, useful
for adding to the graph.
Examples
model <- stages_fbhc(full(PhDArticles, lambda = 1))
barplot(model, "Kids", beside = TRUE)
[Package stagedtrees version 2.3.0 Index]