View source: R/sort_hierarchy.R
sort_hierarchy | R Documentation |
Sorts the hierarchy by location hierarchy so that children follow parents and everything is alphabetical. In addition, arbitrary locations can be moved to the front for easy lookup in e.g., output PDFs.
sort_hierarchy(dt, prepend = NULL)
dt |
data.table instance. MUST have the following columns: location_id, path_to_top_parent |
prepend |
numeric vector of location_id values to prepend to the document. If provided, these values will be moved to the beginning of the result in the order provided and all other values will be sorted. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.