processSHG: Process raw SHG output

Description Usage Arguments Examples

View source: R/runSHG.R

Description

The SHG creates an out_1950.out file which is the raw output. The following function runs python code that decomposes that output into a few other files that will create an R-readable table. A SHG file is saved to "smoking_histories.csv" in the working directory. The function also returns the smoking history as a data frame object in R. If you have a output_XXXX.out file from your own SHG simulations, you can process it using this function to load an R object that can be used for simulating the risk factors.

Usage

1
processSHG(file, birth_cohort)

Arguments

file

the location of the output_1950.out file (ie: "shg/output_1950.out")

birth_cohort

the year of birth for the cohort (ie: 1950)

Examples

1
smoking_history <- processSHG(file = "~/SHG3.6.4/output_1950.out", birth_cohort = 1950)

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