A parameter file (.prm) is stored as its raw lines (comments included)
with class ts_prm. Values are set by key name, without needing to know
the [Section] they belong to.
Usage
ts_prm_read(path)
ts_prm_template()
ts_prm_set(prm, ...)
ts_prm_get(prm, key)
ts_prm_write(prm, path)Value
ts_prm_read(), ts_prm_template(), and ts_prm_set() return a
ts_prm object. ts_prm_get() returns a character value.
ts_prm_write() returns path invisibly.
Details
ts_prm_template() returns the template bundled with the package
(TreeScan v2.4.1, tree-temporal Poisson scan, 9,999 replications).
Examples
prm <- ts_prm_template() |>
ts_prm_set("monte-carlo-replications" = 999)
ts_prm_get(prm, "monte-carlo-replications")
#> [1] "999"
ts_prm_write(prm, tempfile(fileext = ".prm"))