get_aging_rate: Load aging rate data

View source: R/get_aging_rate.R

get_aging_rateR Documentation

Load aging rate data

Description

get_aging_rate is a function that allows the user to get a demographic dataset regarding the aging rate based on the given parameters.

Usage

get_aging_rate(
  v_state = "National",
  v_year = 2020,
  v_sex = c("Female", "Male", "Total"),
  v_age = c(0, 15, 24, 36)
)

Arguments

v_state

Character vector specifying the state(s) that the function will return.

v_year

Numeric vector that specifies the year(s) to return. Must have numbers between 1985 and 2020. Default is 2021.

v_sex

Character vector selecting sex. Options: Female, Male and Total.

v_age

Numeric vector that specifies the age(s) to return. Must have values between 0 and 89.

Value

A demographic dataset containing the selected year (group, when year_groups = TRUE), state, state code (CVE_GEO), sex, the aging population and the aging rate.

Examples

get_aging_rate(v_state = "National",
               v_year = seq(1991, 1995),
               v_sex = "Total",
               v_age = c(0, 89))


PADeCI/demogmx documentation built on Jan. 27, 2024, 6:43 a.m.