Lays foundation for hierarchical dataframe used for use with hp_dataframe().
add_root(.data, root, attribute = NULL)
| .data | Dataframe to construct hierarchical dataframe from (source data). |
|---|---|
| root | Value to display as root. |
| attribute | Values to tag root (i.e. top level) plane with. |
os_survey %>% add_root("OS Students 2014/15")#> parent_id child_id child node_type link #> 1 OS Students 2014/15 OS Students 2014/15 OS Students 2014/15 ROOT ROOT