15  Package options

15.1 Overview

teems provides a set of advanced options that control package behavior across function calls. For example, teems is rather chatty and users may wish to silence all innocuous messages with ems_option_set(verbose = FALSE). Options are managed through three functions:

  • ems_option_get() retrieves current option values
  • ems_option_set() modifies option values
  • ems_option_reset() restores all options to their defaults

Options persist for the duration of the R session and are reset on package reload.

15.2 Retrieving options

View all current options:

ems_option_get()

Retrieve a specific option by name. An error is raised if the name is not a valid option:

ems_option_get("verbose")
ems_option_get("ndigits")

15.3 Setting options

One or more options can be set in a single call:

ems_option_set(verbose = FALSE)
ems_option_set(verbose = FALSE, ndigits = 8)

15.4 Resetting options

Reset all options to their default values:

ems_option_reset()

15.5 Available options

Option Default Description
verbose TRUE If FALSE, function-specific diagnostics are silenced
write_sub_dir "teems" Name of the subdirectory within the base write_dir set by ems_deploy()
ndigits 6 Exact number of digits to the right of the decimal point written to file for numeric type double. Passed to format() nsmall and round() digits
docker_tag "latest" Docker tag specifying which Docker image to use
accuracy_threshold 0.8 Threshold (converted to a percentage) against which 4-digit precision is compared. A warning is generated if the threshold is not met
check_shock_status TRUE If FALSE, no check on shock element endogenous/exogenous status is conducted
timestep_header "YEAR" Coefficient containing a numeric vector of timestep intervals. For novel intertemporal models — modify with caution
n_timestep_header "NTSP" Coefficient containing a numeric vector length one with sum of timestep intervals. For novel intertemporal models — modify with caution
full_exclude c("DREL", "DVER", "XXCR", "XXCD", "XXCP", "SLUG", "EFLG") Headers to fully exclude from all aspects of the model run. Failure to designate these headers properly will result in errors. Modify with caution