View source: R/get_paths_stages.R
get_stage | R Documentation |
Utility functions to obtain stages from paths and paths from stages.
get_stage(object, path)
get_path(object, var, stage)
object |
an object of class |
path |
character vector, the path from root or a two dimensional array where each row is a path from root. |
var |
character, one of the variable in the staged tree. |
stage |
character vector, the name of the stages for which the paths should be returned. |
get_stage
returns
the stage name(s) for given path(s).
get_path
returns a
data.frame containing the paths
corresponding to the given stage(s).
model <- stages_fbhc(full(PhDArticles))
get_stage(model, c("0", "male"))
paths <- expand.grid(model$tree[2:1])[, 2:1]
get_stage(model, paths)
get_path(model, "Kids", "5")
get_path(model, "Gender", "2")
get_path(model, "Kids", c("5", "6"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.