hier_add {sdcHierarchies} | R Documentation |
Add nodes to an existing hierarchy
Description
This function allows to add nodes (levels) to an existing nested hierarchy.
Usage
hier_add(tree, root, nodes)
Arguments
tree |
a (nested) hierarchy created using |
root |
(character) a name of an existing node in the hierarchy |
nodes |
(character) names of new nodes that should be added below
|
Examples
h <- hier_create(root = "Total", nodes = LETTERS[1:3])
h <- hier_add(h, root = "A", nodes = c("a1", "a5"))
hier_display(h)
[Package sdcHierarchies version 0.21.0 Index]