powered by
This function allows to add nodes (levels) to an existing nested hierarchy.
hier_add(tree, root, nodes)
a (nested) hierarchy created using hier_create() or modified using hier_add(), hier_delete() or hier_rename().
hier_create()
hier_add()
hier_delete()
hier_rename()
(character) a name of an existing node in the hierarchy
(character) names of new nodes that should be added below "root"
"root"
h <- hier_create(root = "Total", nodes = LETTERS[1:3]) h <- hier_add(h, root = "A", nodes = c("a1", "a5")) hier_display(h)
Run the code above in your browser using DataLab