Commit 93e41f85 authored by Delaigue Olivier's avatar Delaigue Olivier
Browse files

v.6.9.36 fix(CRAN): coerce POSIXlt into character in RunModel_GR1A example and...

v.6.9.36 fix(CRAN): coerce POSIXlt into character in RunModel_GR1A example and in SeriesAggreg tests in order to pass CRAN checks on macOS flavors
Refs #94
Showing with 15 additions and 8 deletions
+15 -8
Package: airGR
Type: Package
Title: Suite of GR Hydrological Models for Precipitation-Runoff Modelling
Version: 1.6.9.35
Date: 2021-01-27
Version: 1.6.9.36
Date: 2021-01-28
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"),
......
......@@ -2,7 +2,7 @@
### 1.6.9.35 Release Notes (2021-01-27)
### 1.6.9.36 Release Notes (2021-01-28)
#### Major user-visible changes
......@@ -10,7 +10,13 @@
#### Minor user-visible changes
- Fixed warning returned by GCC Fortran when compiling`frun_GR5H.f90`. ([#93](https://gitlab.irstea.fr/HYCAR-Hydro/airgr/-/issues/93))
- Fixed warning returned by GCC Fortran when compiling `frun_GR5H.f90`. ([#93](https://gitlab.irstea.fr/HYCAR-Hydro/airgr/-/issues/93))
#### CRAN-compatibility updates
- Coerce `POSIXlt` dates into character in `RunModel_GR1A()` example and in `SeriesAggreg()` tests in order to avoid bad subsetting time series due to mixing UTC and local time on macOS flavors. ([#94](https://gitlab.irstea.fr/HYCAR-Hydro/airgr/-/issues/94))
____________________________________________________________________________________
......
......@@ -60,7 +60,7 @@ TabSeries <- data.frame(DatesR = BasinObs$DatesR,
P = BasinObs$P,
E = BasinObs$E,
Qmm = BasinObs$Qmm)
TabSeries <- TabSeries[TabSeries$DatesR < "2012-09-01", ]
TabSeries <- TabSeries[as.character(TabSeries$DatesR) < "2012-09-01", ]
BasinObs <- SeriesAggreg(TabSeries, Format = "\%Y",
YearFirstMonth = 09,
ConvertFun = c("sum", "sum", "sum"))
......
......@@ -61,9 +61,10 @@ test_that("Check SeriesAggreg output values on yearly aggregation", {
E = BasinObs$E,
Qmm = BasinObs$Qmm
)
GoodValues <- apply(BasinObs[BasinObs$DatesR >= "1984-09-01" &
BasinObs$DatesR < "1985-09-01",
c("P", "E", "Qmm")], 2, sum)
GoodValues <- apply(BasinObs[as.character(BasinObs$DatesR) >= "1984-09-01" &
as.character(BasinObs$DatesR) < "1985-09-01",
c("P", "E", "Qmm")],
MARGIN = 2, FUN = sum)
TestedValues <- unlist(SeriesAggreg(TabSeries,
Format = "%Y",
YearFirstMonth = 9,
......
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