Commit 4863f7a6 authored by Delaigue Olivier's avatar Delaigue Olivier
Browse files

v1.6.9.1 build(NAMESPACE): change class of SeriesAggreg.list to avoid the use...

v1.6.9.1 build(NAMESPACE): change class of SeriesAggreg.list to avoid the use of '['.InputsModel and '['.OutputsModel when the ' (' function is used
Refs #67
Showing with 7 additions and 3 deletions
+7 -3
Package: airGR Package: airGR
Type: Package Type: Package
Title: Suite of GR Hydrological Models for Precipitation-Runoff Modelling Title: Suite of GR Hydrological Models for Precipitation-Runoff Modelling
Version: 1.6.9.1 Version: 1.6.9.2
Date: 2021-01-08 Date: 2021-01-08
Authors@R: c( Authors@R: c(
person("Laurent", "Coron", role = c("aut", "trl"), comment = c(ORCID = "0000-0002-1503-6204")), person("Laurent", "Coron", role = c("aut", "trl"), comment = c(ORCID = "0000-0002-1503-6204")),
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
### 1.6.9.1 Release Notes (2021-01-08) ### 1.6.9.2 Release Notes (2021-01-08)
#### New features #### New features
......
...@@ -6,6 +6,10 @@ SeriesAggreg.list <- function(x, ...@@ -6,6 +6,10 @@ SeriesAggreg.list <- function(x,
except = NULL, except = NULL,
recursive = TRUE, 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)) { if (missing(Format)) {
Format <- .GetSeriesAggregFormat(NewTimeFormat) Format <- .GetSeriesAggregFormat(NewTimeFormat)
} else if (!is.null(NewTimeFormat)) { } else if (!is.null(NewTimeFormat)) {
...@@ -143,7 +147,7 @@ SeriesAggreg.list <- function(x, ...@@ -143,7 +147,7 @@ SeriesAggreg.list <- function(x,
class(res) <- gsub("hourly|daily|monthly|yearly", class(res) <- gsub("hourly|daily|monthly|yearly",
.GetSeriesAggregClass(Format), .GetSeriesAggregClass(Format),
class(x)) classIni)
return(res) return(res)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment