From 3e5416327fd0aa246451db1bea9770f2e8b46434 Mon Sep 17 00:00:00 2001 From: Delaigue Olivier <olivier.delaigue@irstea.priv> Date: Thu, 21 Feb 2019 14:52:06 +0100 Subject: [PATCH] v1.1.3.6 CLEAN: minor typo revision in ErrorCrit_NSE --- DESCRIPTION | 2 +- NEWS.rmd | 2 +- R/ErrorCrit_NSE.R | 12 ++++++------ 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 487d7801..8ffd421e 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 822eb07f..23945fa6 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 5726af94..f14eaa99 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 -- GitLab