error_on_missing_locations: Error on missing locations in hierarchy

View source: R/error_on_missing_locations.R

error_on_missing_locationsR Documentation

Error on missing locations in hierarchy

Description

Compares data to location hierarchy to ensure that data has values present for each hierarchy entry. Issues a stop if any values are missing.

Usage

error_on_missing_locations(
  data,
  ...,
  hierarchy,
  hierarchy.value = "location_id"
)

Arguments

data

vector-like with values corresponding to the location hierarchy

...

captures other arguments. Do not provide any or you will get an error.

hierarchy

IHME location hierarchy from e.g., get_location_metadata

hierarchy.value

the value in the hierarchy to compare to. Default: "location_id"


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