adm_generator: Admission TB variable generator

Description Usage Arguments Author(s) See Also

View source: R/adm_generator.R

Description

Designed to generate additional variables from within the TB admission data file. Age and BMI are calculated from date of birth, start treatment date, height and weight. Start treatment date is also split into components to allow easier grouping by year, month or date.

Usage

1
2
adm_generator(x, rm_orig = TRUE, categorise = TRUE,
  paediatric = TRUE, bin_outcome = TRUE, ...)

Arguments

x

data frame of cleaned TB admission data using the 'tbcleanr' package

rm_orig

logical argument to remove original variables from age and BMI calculators

categorise

logical flag to add factor variable of ages

paediatric

logical flag to add factor variable for childhood ages

bin_outcome

logical flag to add binary outcome variable

...

additional arguments to pass

Author(s)

Jay Achar

See Also

tbgeneratr


JayAchar/tbgeneratr documentation built on Oct. 13, 2019, 1:47 a.m.