diff --git a/DESCRIPTION b/DESCRIPTION index 2873a5c4eaf231df9b0c8c4d30542deda1978faf..33863672b2605bf5d9b0db4960404bc041052b1b 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Package: airGR Type: Package Title: Suite of GR Hydrological Models for Precipitation-Runoff Modelling -Version: 1.6.9.26 -Date: 2021-01-14 +Version: 1.6.9.27 +Date: 2021-01-18 Authors@R: c( person("Laurent", "Coron", role = c("aut", "trl"), comment = c(ORCID = "0000-0002-1503-6204")), person("Olivier", "Delaigue", role = c("aut", "cre"), comment = c(ORCID = "0000-0002-7668-8468"), email = "airGR@inrae.fr"), diff --git a/NAMESPACE b/NAMESPACE index d942354b51a63e02a8ea2f223185c64020370b57..c98743b3f4790e5b9a2ffedef013717415f47f9f 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -9,7 +9,7 @@ useDynLib(airGR, .registration = TRUE) ## S3 methods ## ##################################### S3method('[', InputsModel) -S3method('[', OutputsModel) +#S3method('[', OutputsModel) ### to add in version 2.0 S3method(plot, OutputsModel) S3method(SeriesAggreg, data.frame) S3method(SeriesAggreg, list) @@ -37,7 +37,7 @@ export(ErrorCrit_RMSE) export(Imax) export(PE_Oudin) export(PEdaily_Oudin) -export(plot.OutputsModel) +export(plot.OutputsModel) ### to remove from version 2.0 export(RunModel) export(RunModel_CemaNeige) export(RunModel_CemaNeigeGR4H) diff --git a/NEWS.md b/NEWS.md index 61bc84a3351e704e2f644513bfc4d95780076874..bb266368a7502df97bc9525d3f4c593f56be260e 100644 --- a/NEWS.md +++ b/NEWS.md @@ -2,7 +2,7 @@ -### 1.6.9.26 Release Notes (2021-01-14) +### 1.6.9.27 Release Notes (2021-01-18) #### New features @@ -12,7 +12,7 @@ - `PE_Oudin()` now presents a `RunFortran` argument to run the code in Fortran or in R. The Fortran mode is the fastest. ([#62](https://gitlab.irstea.fr/HYCAR-Hydro/airgr/-/issues/62)) - Added `RunModel_Lag()` which allows to perform a single run for the Lag model over the test period in order to run semi-distributed GR models. ([#34](https://gitlab.irstea.fr/HYCAR-Hydro/airgr/-/issues/34)) - Added the 'sd_model' vignette to explain how to manage the use of semi-distributed GR models. ([#34](https://gitlab.irstea.fr/HYCAR-Hydro/airgr/-/issues/34)) -- Added `[` S3 method for `InputsModel` and `OutputsModel` class objects in order to extract subsets of them. ([#67](https://gitlab.irstea.fr/HYCAR-Hydro/airgr/-/issues/67)) +- Added `[` S3 method for `InputsModel` class object in order to extract subsets of it. ([#67](https://gitlab.irstea.fr/HYCAR-Hydro/airgr/-/issues/67)) #### Deprecated and defunct diff --git a/R/Utils.R b/R/Utils.R index ddbdd449f404170f171d4a07872f27eb6de3fa31..79bc41e55fcf05b9a725b2f22939ca77b8fe3d7a 100644 --- a/R/Utils.R +++ b/R/Utils.R @@ -129,7 +129,7 @@ } -## InputsModel +## OutputsModel .ExtractOutputsModel <- function(x, i) { res <- lapply(x, function(x) { @@ -154,16 +154,16 @@ res } -'[.OutputsModel' <- function(x, i) { - if (!inherits(x, "OutputsModel")) { - stop("'x' must be of class 'OutputsModel'") - } - if (is.factor(i)) { - i <- as.character(i) - } - if (is.numeric(i)) { - .ExtractOutputsModel(x, i) - } else { - NextMethod() - } -} +# '[.OutputsModel' <- function(x, i) { +# if (!inherits(x, "OutputsModel")) { +# stop("'x' must be of class 'OutputsModel'") +# } +# if (is.factor(i)) { +# i <- as.character(i) +# } +# if (is.numeric(i)) { +# .ExtractOutputsModel(x, i) +# } else { +# NextMethod() +# } +# } diff --git a/man/RunModel.Rd b/man/RunModel.Rd index efead0f00cb88c0444224b2586647b6dbb4da1ad..2e76d41d065a140ff0440005ab6635eff63de620 100644 --- a/man/RunModel.Rd +++ b/man/RunModel.Rd @@ -3,7 +3,7 @@ \name{RunModel} \alias{RunModel} -\alias{[.OutputsModel} +%\alias{[.OutputsModel} \title{Run with the provided hydrological model function} @@ -16,8 +16,8 @@ Function which performs a single model run with the provided function over the s \usage{ RunModel(InputsModel, RunOptions, Param, FUN_MOD) - -\method{[}{OutputsModel}(x, i) +% +%\method{[}{OutputsModel}(x, i) } @@ -29,10 +29,10 @@ RunModel(InputsModel, RunOptions, Param, FUN_MOD) \item{Param}{[numeric] vector of model parameters (See details for SD lag model)} \item{FUN_MOD}{[function] hydrological model function (e.g. \code{\link{RunModel_GR4J}}, \code{\link{RunModel_CemaNeigeGR4J}})} - -\item{x}{[InputsModel] object of class InputsModel} - -\item{i}{[integer] of the indices to subset a time series or [character] names of the elements to extract} +% +%\item{x}{[InputsModel] object of class InputsModel} +% +%\item{i}{[integer] of the indices to subset a time series or [character] names of the elements to extract} }