Commit 8e57ee51 authored by Delaigue Olivier's avatar Delaigue Olivier
Browse files

v1.1.2.27 CLEAN: example simplified in SeriesAggreg doc

parent 0a7b562c
Package: airGR
Type: Package
Title: Suite of GR Hydrological Models for Precipitation-Runoff Modelling
Version: 1.1.2.26
Version: 1.1.2.27
Date: 2019-01-18
Authors@R: c(
person("Laurent", "Coron", role = c("aut", "trl"), comment = c(ORCID = "0000-0002-1503-6204")),
......
......@@ -13,7 +13,7 @@ output:
### 1.1.2.26 Release Notes (2019-01-18)
### 1.1.2.27 Release Notes (2019-01-18)
......
......@@ -50,18 +50,17 @@ library(airGR)
data(L0123002)
## preparation of the initial time series data frame at the daily time step
TabSeries <- data.frame(BasinObs$DatesR, BasinObs$P, BasinObs$E, BasinObs$T, BasinObs$Qmm)
TimeFormat <- "daily"
TabSeries <- BasinObs[, c("DatesR", "P", "E", "T", "Qmm")]
## conversion at the monthly time step
NewTimeFormat <- "monthly"
ConvertFun <- c("sum", "sum", "mean", "sum")
NewTabSeries <- SeriesAggreg(TabSeries = TabSeries, TimeFormat, NewTimeFormat, ConvertFun)
NewTabSeries <- SeriesAggreg(TabSeries = TabSeries,
TimeFormat = "daily", NewTimeFormat = "monthly",
ConvertFun = c("sum", "sum", "mean", "sum"))
## conversion at the yearly time step
NewTimeFormat <- "yearly"
ConvertFun <- c("sum", "sum", "mean", "sum")
NewTabSeries <- SeriesAggreg(TabSeries = TabSeries, TimeFormat, NewTimeFormat, ConvertFun)
NewTabSeries <- SeriesAggreg(TabSeries = TabSeries,
TimeFormat = "daily", NewTimeFormat = "yearly",
ConvertFun = c("sum", "sum", "mean", "sum"))
}
......
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