hier_info: Information about hierarchy-codes

Description Usage Arguments Value Examples

View source: R/hier_info.R

Description

hier_info() computes various information about hierarchy codes or the (nested) hierarchy.

Usage

1
hier_info(tree, nodes = NULL)

Arguments

tree

a (nested) hierarchy created using hier_create() or modified using hier_add(), hier_delete() or hier_rename().

nodes

(character) names of new nodes that should be added below "root"

Value

a list with information about the required nodes. If nodes is NULL (the default), the information is computed for all available nodes of the hierarchy. The following properties are computed:

Examples

1
2
3
4
5
6
7
8
9
h <- hier_create(root = "Total",  nodes = LETTERS[1:3])
h <- hier_add(h, root = "A", nodes = c("a1", "a5"))
hier_display(h)

# about a specific node
hier_info(h, nodes = "a1")

# about all nodes
hier_info(h)

sdcHierarchies documentation built on Aug. 12, 2020, 5:09 p.m.