stndnaming {stagedtrees} | R Documentation |
Standard renaming of stages
Description
Rename all stages in a staged event tree.
Usage
stndnaming(
object,
uniq = FALSE,
prefix = FALSE,
ignore = object$name_unobserved
)
Arguments
object |
an object of class |
uniq |
logical, if stage numbers should be unique over all tree. |
prefix |
logical, if stage names should be prefixed with variable name. |
ignore |
vector of stages which will be ignored and left untouched,
by default the name of the unobserved stages stored in
|
Value
a staged event tree object with stages named with consecutive integers.
Examples
model <- stages_fbhc(full(PhDArticles, join_unobserved = TRUE))
model$stages
model1 <- stndnaming(model)
model1$stages
### unique stage names in all tree
model2 <- stndnaming(model, uniq = TRUE)
model2$stages
### prefix stage names with variable name
model3 <- stndnaming(model, prefix = TRUE)
model3$stages
### manuallty select stage names left untouched
model4 <- stndnaming(model, ignore = c("2", "6"), prefix = TRUE)
model4$stages
[Package stagedtrees version 2.3.0 Index]