getPopulationFractions: Get population fractions

Description Usage Arguments Value Author(s)

View source: R/getPopulationFractions.R

Description

Gets population fractions for a given set of age ranges

Usage

1
getPopulationFractions(ages, year = 2015, population)

Arguments

ages

Vector of ages. Each element represents the upper range of an age range. The lowest bound is presumed to be zero. If the oldest age does not reach the end of the population range, an additional element is added to span the full range. This function by default uses flumodelsutil_data$population.US for age information (2015 US population). One could also use the acs package to download data dynamically, but that requires the user to request an individual key from the ACS for access.

year

Year to sample population from. Defaults to 2015.

population

Population data frame that contains age and population values. Defaults to 2015 US population. The two required columns of the data frame are AGE and TOT_POP.

Value

A vector population fractions that sums to 1

Author(s)

Matt Clay <clay.matt@gmail.com>


HHS/ASPR-flumodelsutil documentation built on Dec. 31, 2020, 12:58 p.m.