powered by
Sets a specific parameter value in species parameter lists, automatically finding the correct category.
set_parameter_value(params, param, value)
The params list with params[[category]][[param]]
params
params[[category]][[param]]
replaced by value, where category is the first category in which param is found. Throws an error if param is not found in any category.
value
category
param
Species parameters list
Parameter name to set
New parameter value
sp <- list(consumption = list(CA = 0.303, CB = -0.275)) updated <- set_parameter_value(sp, "CA", 0.350) updated$consumption$CA
Run the code above in your browser using DataLab