update_param_list is used to update list of all parameters with new values for specific parameters.

update_param_list(l_params_all, params_updated, allow_new = FALSE)

Arguments

l_params_all

List with all parameters of decision model

params_updated

Parameters for which values need to be updated

allow_new

Logical variable to allow params_updated to contain names that are not already in l_params_all. When FALSE (default), such names raise an error, which catches misspelled parameter names before they silently leave the model running at its old values. Default = FALSE.

Value

A list with all parameters updated.

Examples

l_params_all <- load_all_params()
l_params_upd <- update_param_list(l_params_all, c(p_S1S2 = 0.2))
l_params_upd$p_S1S2
#> [1] 0.2