diff --git a/DESCRIPTION b/DESCRIPTION index 487d7801d04b2b0455a5a243198ad8bd4df6f155..8ffd421e910627603ad7434a8ca85886088028cb 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.1.3.5 +Version: 1.1.3.6 Date: 2019-02-21 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 822eb07f8964b9f19c2fc87f36d8e3892e6ef57b..23945fa64a0b6af2014d96b5dad77e6275e1ca10 100644 --- a/NEWS.rmd +++ b/NEWS.rmd @@ -13,7 +13,7 @@ output: -### 1.1.3.5 Release Notes (2019-02-21) +### 1.1.3.6 Release Notes (2019-02-21) diff --git a/R/ErrorCrit_NSE.R b/R/ErrorCrit_NSE.R index 5726af94f87fa861160b42758f5b838a46879455..f14eaa99543775d63eab06436b768da563a3984d 100644 --- a/R/ErrorCrit_NSE.R +++ b/R/ErrorCrit_NSE.R @@ -6,8 +6,8 @@ ErrorCrit_NSE <- function(InputsCrit, OutputsModel, warnings = TRUE, verbose = T stop("InputsCrit must be of class 'InputsCrit' \n") return(NULL) } - if (inherits(InputsCrit, "Multi") | inherits(InputsCrit, "Compo")) { - stop("InputsCrit must be of class 'Single'. Use the ErrorCrit function on objects of class 'Multi' or 'Compo'") + if (inherits(InputsCrit, "Multi") | inherits(InputsCrit, "Compo")) { + stop("InputsCrit must be of class 'Single'. Use the ErrorCrit function on objects of class 'Multi' or 'Compo' with NSE") return(NULL) } if (!inherits(OutputsModel, "OutputsModel")) { @@ -34,10 +34,10 @@ ErrorCrit_NSE <- function(InputsCrit, OutputsModel, warnings = TRUE, verbose = T if (InputsCrit$transfo == "sort") { CritName <- "NSE[sort(CritVar)]" } - CritName <- gsub(pattern = "CritVar", replacement = CritVar, x = CritName) - CritValue <- NA - CritBestValue <- +1 - Multiplier <- -1 + CritName <- gsub(pattern = "CritVar", replacement = CritVar, x = CritName) + CritValue <- NA + CritBestValue <- +1 + Multiplier <- -1 ### must be equal to -1 or +1 only