From 0a005c7c13fabe638c99f4b4d581a03dd27d2c29 Mon Sep 17 00:00:00 2001 From: Delaigue Olivier <olivier.delaigue@irstea.priv> Date: Wed, 29 Aug 2018 15:35:22 +0200 Subject: [PATCH] v1.0.13.0 Ind_zeroes argument of CreateInputsCrit is deprecated --- DESCRIPTION | 2 +- NEWS.rmd | 4 +++- R/CreateInputsCrit.R | 14 +++----------- man/CreateInputsCrit.Rd | 2 +- 4 files changed, 8 insertions(+), 14 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index bcaec634..74ddfb41 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.0.12.6 +Version: 1.0.13.0 Date: 2018-08-29 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 bf7e6f74..fa861e2d 100644 --- a/NEWS.rmd +++ b/NEWS.rmd @@ -14,13 +14,15 @@ output: -### 1.0.12.6 Release Notes (2018-08-29) +### 1.0.13.0 Release Notes (2018-08-29) #### Deprectated and defunct - The <code>LatRad</code> argument is now deprecated in <code>PEdaily_Oudin()</code> and replaced by the <code>Lat</code> argument. +- The unused <code>Ind_zeroes</code> argument of the <code>CreateInputsCrit()</code> function is now deprecated. + #### Major user-visible changes diff --git a/R/CreateInputsCrit.R b/R/CreateInputsCrit.R index 6b125afd..4c2d61c9 100644 --- a/R/CreateInputsCrit.R +++ b/R/CreateInputsCrit.R @@ -84,22 +84,15 @@ CreateInputsCrit <- function(FUN_CRIT, return(NULL) } - if (!is.null(Ind_zeroes)) { - if (!is.vector(Ind_zeroes)) { - stop("Ind_zeroes must be a vector of integers \n") - return(NULL) - } - if (!is.integer(Ind_zeroes)) { - stop("Ind_zeroes must be a vector of integers \n") - return(NULL) - } + if (!missing(Ind_zeroes)) { + warning("Deprecated \"Ind_zeroes\" argument") } + if (!is.null(epsilon)) { if (!is.vector(epsilon) | length(epsilon) != 1 | !is.numeric(epsilon)) { stop("epsilon must be single numeric value \n") return(NULL) - } epsilon = as.double(epsilon) } @@ -118,7 +111,6 @@ CreateInputsCrit <- function(FUN_CRIT, InputsCrit <- list(BoolCrit = BoolCrit, Qobs = Qobs, transfo = transfo, - Ind_zeroes = Ind_zeroes, epsilon = epsilon) class(InputsCrit) <- c("InputsCrit", ObjectClass) diff --git a/man/CreateInputsCrit.Rd b/man/CreateInputsCrit.Rd index 8011000c..dfa0c9dc 100644 --- a/man/CreateInputsCrit.Rd +++ b/man/CreateInputsCrit.Rd @@ -27,7 +27,7 @@ CreateInputsCrit(FUN_CRIT, InputsModel, RunOptions, Qobs, BoolCrit = NULL, \item{transfo}{(optional) [character] name of the transformation (e.g. \code{""}, \code{"sqrt"}, \code{"log"}, \code{"inv"}, \code{"sort"})} -\item{Ind_zeroes}{(optional) [numeric] indices of the time steps where zeroes are observed} +\item{Ind_zeroes}{(deprecated) [numeric] indices of the time steps where zeroes are observed} \item{epsilon}{(optional) [numeric] epsilon to add to all Qobs and Qsim if \emph{$Ind_zeroes} is not empty} -- GitLab