Commit 9c462193 authored by Delaigue Olivier's avatar Delaigue Olivier
Browse files

v1.2.9.32 BUG: check FUN_CRIT in Calibration* funs and fixed return in Calibration fun

Showing with 10 additions and 5 deletions
+10 -5
Package: airGR Package: airGR
Type: Package Type: Package
Title: Suite of GR Hydrological Models for Precipitation-Runoff Modelling Title: Suite of GR Hydrological Models for Precipitation-Runoff Modelling
Version: 1.2.9.31 Version: 1.2.9.32
Date: 2019-03-20 Date: 2019-03-20
Authors@R: c( Authors@R: c(
person("Laurent", "Coron", role = c("aut", "trl"), comment = c(ORCID = "0000-0002-1503-6204")), person("Laurent", "Coron", role = c("aut", "trl"), comment = c(ORCID = "0000-0002-1503-6204")),
......
...@@ -13,7 +13,7 @@ output: ...@@ -13,7 +13,7 @@ output:
### 1.2.9.31 Release Notes (2019-03-20) ### 1.2.9.32 Release Notes (2019-03-20)
......
...@@ -8,11 +8,14 @@ Calibration <- function(InputsModel, ...@@ -8,11 +8,14 @@ Calibration <- function(InputsModel,
FUN_TRANSFO = NULL, FUN_TRANSFO = NULL,
verbose = TRUE) { verbose = TRUE) {
FUN_MOD <- match.fun(FUN_MOD) 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) FUN_CALIB <- match.fun(FUN_CALIB)
if (!is.null(FUN_TRANSFO)) { if (!is.null(FUN_TRANSFO)) {
FUN_TRANSFO <- match.fun(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))
} }
...@@ -9,7 +9,9 @@ Calibration_Michel <- function(InputsModel, ...@@ -9,7 +9,9 @@ Calibration_Michel <- function(InputsModel,
FUN_MOD <- match.fun(FUN_MOD) 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)) { if (!is.null(FUN_TRANSFO)) {
FUN_TRANSFO <- match.fun(FUN_TRANSFO) FUN_TRANSFO <- match.fun(FUN_TRANSFO)
} }
......
Supports Markdown
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