hier_codes: Default-Codes

View source: R/hier_codes.R

hier_codesR Documentation

Default-Codes

Description

hier_codes() returns the standardized codes for the nodes of a tree.

Usage

hier_codes(tree)

Arguments

tree

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

Value

a named character vector with names being the node-names and the values the standardized codes

Examples

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

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