This function returns a tree in default format (as for
example created using hier_create()
) for objects created using
hier_convert()
.
hier_to_tree(inp)
inp | a nested tree object created using |
---|
a nested hierarchy with default format
h <- hier_create(root = "Total", nodes = LETTERS[1:3]) h <- hier_add(h, root = "A", nodes = c("a1", "a5")) sdc <- hier_convert(h, as = "sdc") hier_display(h)#> Total #> ├─A #> │ ├─a1 #> │ └─a5 #> ├─B #> └─C#> Total #> ├─A #> │ ├─a1 #> │ └─a5 #> ├─B #> └─C#> Total #> ├─A #> │ ├─a1 #> │ └─a5 #> ├─B #> └─C