change_params: Change model parameters

Description Usage Arguments See Also Examples

Description

The change_params() function is for changing the parameters in a model object that has already been constructed. Note that this function is implemented only for model objects that have one elemental function for each control slot. In the future, this may be changed.

Usage

1
change_params(mutables, new_params, model_object)

Arguments

mutables

A named list. The name of each element should refer to a control object and the elements should be the names of arguments for the associated elemental function. These are the parameters that will be changed.

new_params

A vector of new parameter values. The order of the vector should correspond to the order of arguments in mutables.

model_object

A model object or any of its child classes.

See Also

class.model

Examples

1
2
3
4
5
# Suppose a model, "model_obj", has a "DOR_control" slot with one parameter "max" that is initially set to 100.
# To change the value to 200:
mutables = list( DOR_control = "max" )
new_params = 200
change_params( mutables, new_params, model_obj )

Don-Li/CAB_original documentation built on May 6, 2019, 2:53 p.m.