View source: R/parents_of_children.R
parents_of_children | R Documentation |
Given a vector of location IDs, returns the vector of their unique parent IDs at a given level.
parents_of_children(child_loc_ids, hierarchy, parent_level)
child_loc_ids |
[int] Vector of location IDs to pull parent ID for |
hierarchy |
[data.table] Hierarchy. Must have columns location_id, path_to_top_parent, and level. |
parent_level |
[int] Single level of the hierarchy - find all parent location_ids of child location_ids at this level |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.