parent_of_child: parent_of_child

View source: R/parents_of_children.R

parent_of_childR Documentation

parent_of_child

Description

Given a location ID, returns its parent ID at a given level.

Usage

parent_of_child(child_location_id, hierarchy, parent_level)

Arguments

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


ihmeuw/ihme.covid documentation built on Nov. 2, 2022, 2:25 a.m.