construct_tree | R Documentation |
Will create a tree as a nested list from a data frame with specified order.
construct_tree(
data,
id_column = 1,
parent_id_column = 2,
sort_order_column = 3
)
data |
Data frame with at minimum id, parent id and sort order columns to construct tree from. |
id_column |
Index of column containing IDs. |
parent_id_column |
Index of column containing parent IDs. |
sort_order_column |
Index of column containing sort orders. |
The tree represented as a list.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.