hier_create: Create a hierarchy

Description Usage Arguments Value See Also Examples

View source: R/hier_create.R

Description

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

Usage

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

Arguments

root

(character) name of the overall total

nodes

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

Value

a (nested) sdc hierarchy tree

See Also

hier_add hier_delete hier_rename hier_export hier_convert hier_app hier_info

Examples

1
2
3
4
5
6
7
# without nodes
h <- hier_create(root = "tot")
hier_display(h)

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

Example output

Loading required package: shinythemes
Package 'sdcHierarchies' 0.17 has been loaded.
tot
tot
+-A
+-B
+-C
+-D
\-E

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