Set or change parameter values in a model object.
set_pars.Rd
This function updates the parameters of a model object. It accepts a named
vector of new parameters and uses the replace_values
helper function to
merge these into the existing or default parameters, preserving other values
and their order.
Arguments
- model
A model object that has
getPars()
andsetPars()
methods (e.g., arodeo
model object).- new_pars
A named vector of new parameter values to set. Its names should correspond to parameters in the model. If
NULL
, no parameters are changed beyonddefault_pars
.- default_pars
An optional named vector representing the default parameters. If not provided,
model$getPars()
will be used as the base onto whichnew_pars
are applied.