recode_history: Prepare license history for selected quarter (recoding)

Description Usage Arguments See Also

View source: R/dashboard-prep.R

Description

This is basically a wrapper for several functions called in sequence, particularly label_categories and recode_agecat. The month_to_quarter parameter is used to specify an output "quarter" variable based on the input "month" variable.

Usage

1
2
3
4
5
recode_history(
  history,
  month_to_quarter = function(x) case_when(x <= 3 ~ 1, x <= 6 ~ 2, x <= 9 ~ 3, TRUE ~
    4)
)

Arguments

history

data frame: table produced by load_history()

month_to_quarter

function used to calculate quarter (based on month values). The default function assumes a calendar year, so it will need to be modified in cases where fiscal year is used (see VA 2019-q2 code for an example).

See Also

Other functions to prepare data for summarization: aggregate_pop(), extrapolate_pop(), factor_age_acs(), prep_pop(), quarterly_filter(), quarterly_lapse()


southwick-associates/sadash documentation built on Jan. 6, 2022, 5:17 p.m.