Aggregates the sub-monthly data in a riversCentralAsia data set to monthly data.
Source:R/aggregate_to_monthly.R
aggregate_to_monthly.Rd
A riversCentralAsia data set can be of type discharge, precipitation, and temperature whereby temerature may be mean, minimum or maximum. The function aggregate_data aggregates all sub-monthly data in the data tibble to monthly data, according to the type-function pair given in the second argument. The user specifies which aggregation function to use for each data type using timetk's summarise_by_time.
Arguments
- dataTable
A tibble of the format
ChirchikRiverBasin
. Must contain at least the columns date, data, norm, type and code.- funcTypeLib
is a list of functions with associated data types that will be applied to the data. Currently, the aggregation functions
mean
andsum
are supported. The user specifies the data types which are to be aggregated with eithermean
orsum
.
Value
Returns a tibble of the same format as data
with data
aggregated to monthly time steps and "mon" in the resolution
column.
Returns 1 if aggregation fails.
See also
Other Helper functions:
%>%()
,
cutRaster2Basin()
,
decadeMaker()
,
generateSeqDates()
,
hyear()
,
monDateSeq()
,
posixct2rsminerveChar()