Description Usage Arguments Examples
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.
1 | processSHG(file, birth_cohort)
|
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) |
1 | smoking_history <- processSHG(file = "~/SHG3.6.4/output_1950.out", birth_cohort = 1950)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.