add_pop_counts: Given a dataframe with year, age, sex, and race, returns...

View source: R/add_populations.R

add_pop_countsR Documentation

Given a dataframe with year, age, sex, and race, returns population estimate

Description

Uses the internal narcan::pop_est dataset to return yearly population estimates by age, sex, and race. See narcan::pop_est for columns and possible values of each matching variable

Usage

add_pop_counts(df, by_vars = c("year", "age", "sex", "race"))

Arguments

df

MCOD dataframe

by_vars

variables to match on

Value

dataframe


mkiang/narcan documentation built on Sept. 26, 2024, 7:18 a.m.