Commit d9e330c4 authored by Delaigue Olivier's avatar Delaigue Olivier
Browse files

v1.2.7.8 CLEAN: Calibration returns an error when FUN_CALIB is not a function

parent 4f272a7b
Package: airGR
Type: Package
Title: Suite of GR Hydrological Models for Precipitation-Runoff Modelling
Version: 1.2.7.7
Date: 2019-03-04
Version: 1.2.7.8
Date: 2019-03-06
Authors@R: c(
person("Laurent", "Coron", role = c("aut", "trl"), comment = c(ORCID = "0000-0002-1503-6204")),
person("Charles", "Perrin", role = c("aut", "ths"), comment = c(ORCID = "0000-0001-8552-1881")),
......
......@@ -13,7 +13,7 @@ output:
### 1.2.7.7 Release Notes (2019-03-04)
### 1.2.7.8 Release Notes (2019-03-06)
......@@ -38,6 +38,8 @@ output:
- <code>CreateRunOptions()</code> now presents a <code>warnings</code> argument to replace the verbose action (the <code>verbose</code> argument is keep to print messages).
- <code>Calibration()</code> function now returns an error message if <code>FUN_CALIB</code> is not a function
#### Major user-visible changes
......
Calibration <- function(InputsModel, RunOptions, InputsCrit, CalibOptions, FUN_MOD, FUN_CRIT, FUN_CALIB = Calibration_Michel, FUN_TRANSFO = NULL, verbose = TRUE) {
Calibration <- function(InputsModel, RunOptions, InputsCrit, CalibOptions,
FUN_MOD, FUN_CRIT, FUN_CALIB = Calibration_Michel, FUN_TRANSFO = NULL,
verbose = TRUE) {
if (! is.function(FUN_CALIB)) {
stop("'FUN_CALIB' must be a function")
}
return(FUN_CALIB(InputsModel, RunOptions, InputsCrit, CalibOptions, FUN_MOD, FUN_CRIT, FUN_TRANSFO, verbose = verbose))
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment