Commit 95b30045 authored by Dorchies David's avatar Dorchies David
Browse files

v1.6.8.33 feat(SeriesAggreg): remove ConvertFun default value

Refs #41
parent 3e49873d
Pipeline #18820 passed with stages
in 12 minutes and 32 seconds
Package: airGR
Type: Package
Title: Suite of GR Hydrological Models for Precipitation-Runoff Modelling
Version: 1.6.8.32
Date: 2020-12-23
Version: 1.6.8.33
Date: 2021-01-05
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"),
......
......@@ -63,9 +63,6 @@ export(TransfoParam_GR5J)
export(TransfoParam_GR6J)
export(TransfoParam_Lag)
export(.ErrorCrit)
export(.AggregConvertFunTable)
#####################################
......
......@@ -2,7 +2,7 @@
### 1.6.8.32 Release Notes (2020-12-23)
### 1.6.8.33 Release Notes (2021-01-05)
#### New features
......
SeriesAggreg.data.frame <- function(x,
Format,
ConvertFun = getAggregConvertFun(names(x)[-1]),
ConvertFun,
TimeFormat = NULL,
NewTimeFormat = NULL,
YearFirstMonth = 1,
......
......@@ -24,16 +24,11 @@ Warning: on the aggregated outputs, the dates correspond to the beginning of the
\code{\link{SeriesAggreg.InputsModel}} and \code{\link{SeriesAggreg.OutputsModel}}
call \code{\link{SeriesAggreg.list}} which itself calls \code{\link{SeriesAggreg.data.frame}}.
So, all arguments passed to any \code{\link{SeriesAggreg}} method will be passed to \code{\link{SeriesAggreg.data.frame}}.
If \code{ConvertFun} is not provided, the operation to perform is guessed from the name of the list items or column
name dataframe in respect with the matching table \code{.AggregConvertFunTable}.
}
\usage{
\method{SeriesAggreg}{data.frame}(x,
Format,
ConvertFun = getAggregConvertFun(names(x)[-1]),
ConvertFun,
TimeFormat = NULL,
NewTimeFormat = NULL,
YearFirstMonth = 1,
......
......@@ -66,7 +66,8 @@ test_that("Check SeriesAggreg output values on yearly aggregation", {
c("P", "E", "Qmm")], 2, sum)
TestedValues <- unlist(SeriesAggreg(TabSeries,
Format = "%Y",
YearFirstMonth = 9)[1, c("P", "E", "Qmm")])
YearFirstMonth = 9,
ConvertFun = rep("sum", 3))[1, c("P", "E", "Qmm")])
expect_equal(GoodValues, TestedValues)
})
......
Markdown is supported
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