hier_display: Displays the hierarchy

View source: R/hier_display.R

hier_displayR Documentation

Displays the hierarchy

Description

This function shows the entire hierarchy in a nice way.

Usage

hier_display(x, root = NULL)

Arguments

x

a hierarchy object, either directly generated and modified using hier_create(), hier_add(), hier_delete() and/or hier_rename() or objects converted using hier_convert()

root

NULL if the entire tree should be printed or a name of a node which is used as temporary root-node for printing

Value

NULL; the tree is printed to the prompt

Examples

h <- hier_create(root = "Total", nodes = LETTERS[1:2])
h <- hier_add(h, root = "A", nodes = c("a1", "a2"))

# display the entire tree
hier_display(h)

# display only a subtree
hier_display(h, root = "A")

sdcHierarchies documentation built on Aug. 11, 2023, 1:07 a.m.