diff --git a/DESCRIPTION b/DESCRIPTION index 705ecb7457296acd0f1b6945fada130569258749..aa364b19f4050320b09cfd2c42d2ebee2d30e894 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: airGR Type: Package Title: Suite of GR Hydrological Models for Precipitation-Runoff Modelling -Version: 1.2.9.31 +Version: 1.2.9.32 Date: 2019-03-20 Authors@R: c( person("Laurent", "Coron", role = c("aut", "trl"), comment = c(ORCID = "0000-0002-1503-6204")), diff --git a/NEWS.rmd b/NEWS.rmd index c15f129a52539992f8b253016d83c4d4a09ff853..f2756cb95112181809844e6bdb677cd559dab7aa 100644 --- a/NEWS.rmd +++ b/NEWS.rmd @@ -13,7 +13,7 @@ output: -### 1.2.9.31 Release Notes (2019-03-20) +### 1.2.9.32 Release Notes (2019-03-20) diff --git a/R/Calibration.R b/R/Calibration.R index a65d78c4e41f4d00ea32e9c03b4ab4ead130af77..c6088ad3d47753322e3cec013fcc72964f91a32d 100644 --- a/R/Calibration.R +++ b/R/Calibration.R @@ -8,11 +8,14 @@ Calibration <- function(InputsModel, FUN_TRANSFO = NULL, verbose = TRUE) { FUN_MOD <- match.fun(FUN_MOD) - FUN_CRIT <- match.fun(FUN_CRIT) + if (!missing(FUN_CRIT)) { + FUN_CRIT <- match.fun(FUN_CRIT) + } FUN_CALIB <- match.fun(FUN_CALIB) if (!is.null(FUN_TRANSFO)) { FUN_TRANSFO <- match.fun(FUN_TRANSFO) } - return(FUN_CALIB(InputsModel, RunOptions, InputsCrit, CalibOptions, FUN_MOD, FUN_TRANSFO, verbose = verbose)) + return(FUN_CALIB(InputsModel = InputsModel, RunOptions = RunOptions, InputsCrit = InputsCrit, + CalibOptions = CalibOptions, FUN_MOD = FUN_MOD, FUN_TRANSFO = FUN_TRANSFO, verbose = verbose)) } diff --git a/R/Calibration_Michel.R b/R/Calibration_Michel.R index b782e309479e9e7aa689fd4ea7c138a758838e38..6051506a144fc67c96e10e9a168fe7c8dcef587a 100644 --- a/R/Calibration_Michel.R +++ b/R/Calibration_Michel.R @@ -9,7 +9,9 @@ Calibration_Michel <- function(InputsModel, FUN_MOD <- match.fun(FUN_MOD) - FUN_CRIT <- match.fun(FUN_CRIT) + if (!missing(FUN_CRIT)) { + FUN_CRIT <- match.fun(FUN_CRIT) + } if (!is.null(FUN_TRANSFO)) { FUN_TRANSFO <- match.fun(FUN_TRANSFO) }