diff --git a/DESCRIPTION b/DESCRIPTION index 07e43cc9500a9f218263d52a29f24041f976f1e6..4483efe45e734ac12ee61608d0f10aef9001ef16 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.6.9.1 +Version: 1.6.9.2 Date: 2021-01-08 Authors@R: c( person("Laurent", "Coron", role = c("aut", "trl"), comment = c(ORCID = "0000-0002-1503-6204")), diff --git a/NEWS.md b/NEWS.md index f976a4bfb500e849037a050324029c1dc70f0b0b..3f943f8173491615c333cb169957dbe060d18c10 100644 --- a/NEWS.md +++ b/NEWS.md @@ -2,7 +2,7 @@ -### 1.6.9.1 Release Notes (2021-01-08) +### 1.6.9.2 Release Notes (2021-01-08) #### New features diff --git a/R/SeriesAggreg.list.R b/R/SeriesAggreg.list.R index 8834347dbc5ac40fa35a5c19b074699173c34f15..ab7df82d2cfe03ed205d8a47c31231077bb11be8 100644 --- a/R/SeriesAggreg.list.R +++ b/R/SeriesAggreg.list.R @@ -6,6 +6,10 @@ SeriesAggreg.list <- function(x, except = NULL, recursive = TRUE, ...) { + + classIni <- class(x) + class(x) <- "list" # in order to avoid the use of '['.InputsModel' or '['.OutputsModel' when x[i] is used + if (missing(Format)) { Format <- .GetSeriesAggregFormat(NewTimeFormat) } else if (!is.null(NewTimeFormat)) { @@ -143,7 +147,7 @@ SeriesAggreg.list <- function(x, class(res) <- gsub("hourly|daily|monthly|yearly", .GetSeriesAggregClass(Format), - class(x)) + classIni) return(res)