Commit d6b5fc88 authored by Delaigue Olivier's avatar Delaigue Olivier Committed by Dorchies David
Browse files

v1.4.4.23 BUG: SeriesAggreg now runs when there is only one column to convert # 41

Showing with 2 additions and 2 deletions
+2 -2
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.4.4.22 Version: 1.4.4.23
Date: 2020-04-20 Date: 2020-04-20
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")),
......
...@@ -36,7 +36,7 @@ SeriesAggreg2 <- function(TabSeries, Format, TimeFormat, NewTimeFormat, ConvertF ...@@ -36,7 +36,7 @@ SeriesAggreg2 <- function(TabSeries, Format, TimeFormat, NewTimeFormat, ConvertF
TabSeries[[1L]] <- as.POSIXct(TabSeries[[1L]]) TabSeries[[1L]] <- as.POSIXct(TabSeries[[1L]])
} }
## check TabSeries other columns (boolean converted to numeric) ## check TabSeries other columns (boolean converted to numeric)
apply(TabSeries[, -1L], MARGIN = 2, FUN = function(iCol) { apply(TabSeries[, -1L, drop = FALSE], MARGIN = 2, FUN = function(iCol) {
if (!is.numeric(iCol)) { if (!is.numeric(iCol)) {
stop("'TabSeries' columns (other than the first one) must be of numeric class") stop("'TabSeries' columns (other than the first one) must be of numeric class")
} }
......
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