add_std_pop: Given a dataframe with age, returns a standard population

View source: R/add_populations.R

add_std_popR Documentation

Given a dataframe with age, returns a standard population

Description

Returns the US 2000 population by default, by any population from the narcan::std_pop$std_cat column is valid.

Usage

add_std_pop(df, std_cat = "s204", by_vars = "age")

Arguments

df

dataframe with age column (in 5-year bins)

std_cat

standard population to use (default: US 2000 standard pop)

by_vars

variables to merge on

Value

dataframe


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