hier_info {sdcHierarchies}R Documentation

Information about hierarchy-codes

Description

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

Usage

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

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)

[Package sdcHierarchies version 0.21.0 Index]