shg_load_params: Load SHG smoking and mortality parameter bundles and...

View source: R/load_params.R

shg_load_paramsR Documentation

Load SHG smoking and mortality parameter bundles and configure the instance

Description

Downloads (or reuses locally cached copies of) separate shg-params smoking and mortality release zips, merges them into an engine layout under the cache, and sets input_data_folder plus relative input filenames on the SHGInterface instance.

Each zip uses the shg-params release layout (⁠params/⁠ CSVs plus metadata.yml). The simulator expects ⁠smoking/*.csv⁠ and ⁠mortality/*.csv⁠ under one folder; this function materializes that tree from the two zips.

Usage

shg_load_params(
  shg,
  smoking_url = NULL,
  mortality_url = NULL,
  mort_params_type = c("acm", "ocm")
)

Arguments

shg

An SHGInterface instance.

smoking_url

URL or local path to the smoking .zip bundle.

mortality_url

URL or local path to the mortality .zip bundle.

mort_params_type

"acm" (default) or "ocm".

For private GitHub-hosted zips, set GITHUB_PAT before downloading.

Value

The SHGInterface instance, invisibly.

Download timeouts

Options shg.params.download.timeout_sec (default 600) and shg.params.download.connect_sec (default 60) control HTTPS transfers when httr2 is installed.


SmokingHistoryGenerator documentation built on June 13, 2026, 1:08 a.m.