Make Age Hash Table
make_age_hash_table.Rd
Create a lookup function that takes a character vector of disease category
names and returns a vector of equal length containing either the lower
or upper age bounds contained in the categories. If no bound is present
then NA
is returned.
Usage
make_age_hash_table(
categories,
re_templates,
which_bound = c("lower", "upper", "neither", "single"),
prefix = ""
)
Arguments
- categories
character vector of disease category names
- re_templates
list of templates that resolve to regular expressions for matching age information contained in category names
- which_bound
resolve the template to match lower or upper bounds, neither (the default), or single
- prefix
pattern to match at the beginning of the string that marks the beginning of age information