parents_of_children: parents_of_children

View source: R/parents_of_children.R

parents_of_childrenR Documentation

parents_of_children

Description

Given a vector of location IDs, returns the vector of their unique parent IDs at a given level.

Usage

parents_of_children(child_loc_ids, hierarchy, parent_level)

Arguments

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


epi-sam/SamsElves documentation built on June 12, 2025, 7 a.m.