View source: R/parents_of_children.R
parent_of_child | R Documentation |
Given a location ID, returns its parent ID at a given level.
parent_of_child(child_location_id, hierarchy, parent_level)
child_location_id |
[int] Location ID 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 |
[int] location_id for a single parent of a single child location
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.