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

v1.4.4.19 NEW: SeriesAggreg now returns warning messages when TimeFormat or...

v1.4.4.19 NEW: SeriesAggreg now returns warning messages when TimeFormat or NewTimeFormat depracated are used
Showing with 22 additions and 6 deletions
+22 -6
Package: airGR
Type: Package
Title: Suite of GR Hydrological Models for Precipitation-Runoff Modelling
Version: 1.4.4.18
Date: 2020-04-09
Version: 1.4.4.19
Date: 2020-04-10
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"),
......
......@@ -4,7 +4,7 @@
### 1.4.4.18 Release Notes (2020-04-09)
### 1.4.4.19 Release Notes (2020-04-10)
#### New features
......
SeriesAggreg2 <- function(TabSeries, Format, ConvertFun,
SeriesAggreg2 <- function(TabSeries, Format, TimeFormat, NewTimeFormat, ConvertFun,
YearFirstMonth = 1, TimeLag = 0, verbose = TRUE) {
## Arguments_check
## Arguments checks
if (!missing(TimeFormat)) {
warning("deprecated 'TimeFormat' argument", call. = FALSE)
}
if (!missing(NewTimeFormat)) {
if (missing(Format)) {
Format <- switch(NewTimeFormat,
hourly = "%Y%m%d%h",
daily = "%Y%m%d",
monthly = "%Y%m",
yearly = "%Y")
msgNewTimeFormat <- sprintf(" 'Format' automatically set to %s", sQuote(Format))
} else {
msgNewTimeFormat <- NULL
}
warning("deprecated 'NewTimeFormat' argument: please use 'Format' instead.",
msgNewTimeFormat, call. = FALSE)
}
## check TabSeries
if (!is.data.frame(TabSeries)) {
stop("'TabSeries' must be a data.frame containing the dates and data to be aggregated")
......
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