Alternate cfp_pfres / cfp_fgres models for sensitivity analysis and more.
Usage
alternate(
x,
f,
run_map,
return_raw = TRUE,
error_funs = NULL,
error_args = NULL
)
alternate_model(run_map, x, f)
Arguments
- x
A cfp_pfres or cfp_fgres model result.
- f
A function taking in a soilphys object and recalculates the relevant columns. See
complete_soilphys()
.- run_map
A data.frame created by
run_map()
with the necessary information how the data is to be changed with each distinctrun_id
.- return_raw
Should the models be returned as is, or after applying any
error_funs
. Default isTRUE
- exporting the models.- error_funs
A list of functions to be applied after flux calculation if
return_raw == FALSE
. This can be used to output not the models but quality parameters instead. Output must contain the column RMSE.- error_args
A list of additional function arguments to be passed to any of the
error_funs
. Must match the length oferror_funs