ab_labels_from_breaks: Create ageband labels

Description Usage Arguments Details Value See Also

View source: R/example_analysis__hes_ip.R

Description

Given breaks construct ageband labels of the form "xx-yy Yrs" and "zz+ Yrs"

Usage

1
2
ab_labels_from_breaks(breaks, style = c("alcohol", "smoking", "generic",
  "ucs"), flag = "0", width = 2)

Arguments

breaks

(integer vector) breaks

style

(character) choose style alcohol: "00-00 Yrs", smoking: "00 - 00", generic: "a0000"

flag

(character) number formatting (see formatC)

width

(integer) number formatting (see formatC)

Details

A general ageband has an age range, specfied by lower (inclusive) and upper (exclusive).

An ageband label is of the general form:

<prefix> <value lower> <separator> <value upper> <suffix>

with the last age band of the form:

<prefix> <value upper> "+" <suffix>

Variations are tailored for specific lookup tables.

* alcohol: 00-00 Yrs * smoking: 00 - 00 * generic: a0000 * ucs: 0 - 0 yrs

Value

(character vector) labels

See Also

Other examples_of_analysis: create__dummy_hesip, create_lu_ageband, create_lu_gender, examples_of_analysis, gen_codes, main__example_analysis__aa_morbidity, main__example_analysis__ac_morbidity, main__example_analysis__sa_morbidity, main__example_analysis__uc_morbidity, main__examples_analysis, ricd10


ianbatesncc/aafractions.ncc documentation built on May 3, 2019, 3:34 p.m.