Learn R Programming

sdcHierarchies (version 0.22.0)

hier_create: Create a hierarchy

Description

This functions allows to generate a hierarchical data structure that can be used in other packages such as cellKey or sdcTable.

Usage

hier_create(root = "Total", nodes = NULL)

Value

a (nested) sdc hierarchy tree

Arguments

root

(character) name of the overall total

nodes

(character) name of leaves (nodes) in the hierarchy

See Also

hier_add hier_delete hier_rename hier_export hier_convert hier_app hier_info

Examples

Run this code
# without nodes
h <- hier_create(root = "tot")
hier_display(h)

# with nodes
h <- hier_create(root = "tot", nodes = LETTERS[1:5])
hier_display(h)

Run the code above in your browser using DataLab