View source: R/parameter_scan.R
run_parameter_scan | R Documentation |
Run ModVege for a different sets of parameters.
run_parameter_scan(environment, param_values, force = FALSE, outfilename = "")
environment |
Either a ModvegeEnvironment instance with all the site,
management and weather inputs expected by ModvegeSite |
param_values |
A named list where each key stands for a ModVege
parameter, i.e. a member of ModvegeParameters |
force |
Boolean. By default ( |
outfilename |
String. If nonempty, the results are stored as an |
results A list containing an entry for each supplied parameter set in param_values. Each entry is itself a list containing the following keys:
The parameter set that was used to run ModVege for this entry.
A list containing for each simulated year a ModvegeSite object which was run for the respective year and therefore carries the respective results.
Special care has to be taken in the creation of the param_values argument.
It's possible to choose values that do not allow for any valid combination.
Confer create_combinations()
.
ModvegeParameters, saveRDS()
, create_combinations()
env = create_example_environment()
# We're creating a trivial list of parameters to explore here in order to
# prevent the example from requiring a long time to execute. See
# [create_combinations()] for more realistic uses of param_values.
param_values = list(w_FGA = c(0, 1), w_FGB = c(0, 1))
run_parameter_scan(env, param_values, force = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.