param | R Documentation |
See numericlist for methods to deal with parameter_list
objects.
param(.x, ...)
## S4 method for signature 'mrgmod'
param(.x, .y = NULL, ..., .pat = "*", .strict = FALSE)
## S4 method for signature 'mrgsims'
param(.x, ...)
## S4 method for signature 'missing'
param(..., .strict = TRUE)
## S4 method for signature 'list'
param(.x, ...)
## S4 method for signature 'ANY'
param(.x, ...)
allparam(.x)
.x |
the model object. |
... |
passed along or name/value pairs to update the parameters
in a model object; when passing new values this way, all values
must be numeric and all all names must exist in the parameter list
for |
.y |
an object to be merged into parameter list; non- |
.pat |
a regular expression (character) to be applied as a filter for which parameters to show when printing. |
.strict |
if |
Can be used to either get a parameter list object from a mrgmod
model object or to update the parameters in a model object.
For both uses, the return value is a parameter_list
object. For the
former use, param()
is usually called to print the parameters to the
screen, but the parameter_list
object can also be coerced to a list
or numeric R object.
Use allparam()
to get a parameter_list
object including
both model parameters and data items listed in $FIXED
.
The update to parameters can be permissive (candidates with names that don't
exist in the parameter list are silently ignored) or strict (all candidates
must already exist in the parameter list). When passing candidate values
via ...
, the update is strict and an error is generated if you pass a
name that isn't found in the parameter list. When candidate values
are passed as a named object via .y
, then the update is permissive. Any
permissive update can be made strict (error if foreign names are found in
the candidates) by passing .strict = TRUE
.
An alternative is to assess the incoming names using inventory()
.
An object of class parameter_list
(see numericlist).
inventory()
## example("param")
mod <- house()
param(mod)
param(mod, .pat="^(C|F)") ## may be useful when large number of parameters
class(param(mod))
param(mod)$KA
param(mod)[["KA"]]
as.list(param(mod))
as.data.frame(param(mod))
mod <- param(mod, CL = 1.2)
new_values <- list(CL = 1.3, VC = 20.5)
mod <- param(mod, new_values)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.