hier_delete | R Documentation |
This function allows to delete nodes (levels) from an existing nested hierarchy.
hier_delete(tree, nodes)
tree |
a (nested) hierarchy created using |
nodes |
character vector of nodes that should be deleted |
h <- hier_create(root = "Total", nodes = LETTERS[1:2])
h <- hier_add(h, root = "A", nodes = c("a1", "a2"))
h <- hier_add(h, root = "B", nodes = c("b1", "b2"))
h <- hier_add(h, root = "b1", nodes = "b1a")
hier_display(h)
h <- hier_delete(h, nodes = c("a1", "b1a"))
hier_display(h)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.