| custom_tol | R Documentation |
These functions update the relative or absolute tolerance values only for the custom tolerance configuration.
custom_tol(.x, .rtol = NULL, .atol = NULL)
custom_rtol(.x, .rtol = list(), .default = NULL, .use = TRUE, ...)
custom_atol(.x, .atol = list(), .default = NULL, .use = TRUE, ...)
.x |
a model object. |
.rtol |
a named numeric list or vector, where names reference
selected model compartments and relative tolerances for those
compartments; |
.atol |
a named numeric list or vector, where names reference
selected model compartments and absolute tolerances for those
compartments; |
.default |
the default tolerance value to use for compartments not
listed in |
.use |
|
... |
|
New tolerance values can be supplied by either a named, numeric vector or
list via .rtol and .atol or via ... or by both. If duplicate
compartment names are found in ... and either .rtol or .atol, the value
passed via ... will take precedence.
The custom_tol() function provides a mechanism for coding customized
tolerances into the model file itself. Simply create named numeric lists
or vectors for customized rtol or atol in a $ENV block. On loading
the model, call custom_tol() and supply the names of those objects as
.rtol and .atol.
An updated model object.
reset_tol(), use_custom_tol(), use_scalar_tol(), get_tol()
mod <- house()
mod <- custom_rtol(mod, GUT = 1e-2, CENT = 1e-3)
new_tolerances <- c(GUT = 1e-4, RESP = 1e-5)
mod <- custom_rtol(mod, new_tolerances, RESP = 1e-6)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.