From bca0526db1c7c11bd9a6b2bfe30cf144fb81afa0 Mon Sep 17 00:00:00 2001 From: Delaigue Olivier <olivier.delaigue@irstea.priv> Date: Wed, 17 Apr 2019 10:39:06 +0200 Subject: [PATCH] v1.2.14.10 UPDATE: syntaxe of power transfo is more flexible in CreateInputsCrit --- DESCRIPTION | 2 +- NEWS.rmd | 2 +- R/CreateInputsCrit.R | 1 + man/CreateInputsCrit.Rd | 2 ++ 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 58a9f996..240acedd 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.14.9 +Version: 1.2.14.10 Date: 2019-04-17 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 84559811..e63d5ff7 100644 --- a/NEWS.rmd +++ b/NEWS.rmd @@ -14,7 +14,7 @@ output: -### 1.2.14.9 Release Notes (2019-04-17) +### 1.2.14.10 Release Notes (2019-04-17) #### New features diff --git a/R/CreateInputsCrit.R b/R/CreateInputsCrit.R index e7df0f07..33a20e1f 100644 --- a/R/CreateInputsCrit.R +++ b/R/CreateInputsCrit.R @@ -232,6 +232,7 @@ CreateInputsCrit <- function(FUN_CRIT, isNotInTransfo <- !(iListArgs2$transfo %in% inTransfo) if (any(isNotInTransfo)) { powTransfo <- iListArgs2$transfo[isNotInTransfo] + powTransfo <- gsub("\\^|[[:alpha:]]", "", powTransfo) numExpTransfo <- suppressWarnings(as.numeric(powTransfo)) if (any(is.na(numExpTransfo))) { stop(msgTransfo, call. = FALSE) diff --git a/man/CreateInputsCrit.Rd b/man/CreateInputsCrit.Rd index 07ee3b2b..337f0bef 100644 --- a/man/CreateInputsCrit.Rd +++ b/man/CreateInputsCrit.Rd @@ -72,6 +72,8 @@ Creation of the \code{InputsCrit} object required to the \code{ErrorCrit_*} func \details{ Users wanting to use \code{FUN_CRIT} functions that are not included in the package must create their own InputsCrit object accordingly. \cr \cr +The syntax of the power transformation can be written in numerical form or as a string of characters, for example for a square: \code{transfo = 2}, \code{"2"} or \code{"^"2"}. +\cr \cr The epsilon value is useful when \code{"log"} or \code{"inv"} transformations are used (to avoid calculation of the inverse or of the logarithm of zero). The impact of this value and a recommendation about the epsilon value to use (usually one hundredth of average observation) are discussed in Pushpalatha et al. (2012) for NSE and in Santos et al. (2018) for KGE and KGE'. \cr \cr We do not advise computing KGE or KGE' with log-transformation as it might be wrongly influenced by discharge values close to 0 or 1 and the criterion value is dependent on the discharge unit. See Santos et al. (2018) for more details and alternative solutions (see the references list below). \cr \cr Users can set the following arguments as atomic or list: \code{FUN_CRIT}, \code{Obs}, \code{VarObs}, \code{BoolCrit}, \code{transfo}, \code{Weights}. If the list format is chosen, all the lists must have the same length. \cr -- GitLab