reformatSHG: Reformats Smoking History Generator Output

Description Usage Arguments Examples

View source: R/reformatSHG.R

Description

This function takes a SHG output from runSHG() and reformats it by longitudinal age. It can take some time to run. It returns these columns: cigday, cigyears, cigstat, for each age in the range of ages. It is called internally by riskFactorSimulator(), and was not intended for direct use by the user. see riskFactorSimulator().

Usage

1
reformatSHG(ages, DAT)

Arguments

ages

the range of ages for each person in the SHG cohort (ie: 45:90)

DAT

The SHG output data, see runSHG()

Examples

1
2
3
SHG_output <- runSHG(100, gender="M", 1950, 1)
ages <- 45:90
reformatted_SHG_output <- reformatSHG(ages, SHG_output)

ekhco/LCsim documentation built on Nov. 4, 2019, 11:50 a.m.