aggregate_xts: Resample observation data at a new time interval

Description Usage Arguments Details Value Examples

Description

Takes a list of time series and resample to a new interval.

Usage

1
aggregate_xts(ser, dt, fun = mean)

Arguments

ser

xts Times series to aggregate

dt

numeric New time interval, hours

fun

function Function applied to aggregate the series to the new interval

Details

Time series of observation data are often of different temporal resolutions, however the input to most hydrological models, as is the case with the Dynamic TOPMODEL, requires those data at the same interval. This provides a method to resample a collection of such data to a single interval.

Value

Time series resampled at the new interval #' @return The list of observations resampled at the new interval.

Examples

1
2
3
4
5
# Resample Brompton rainfall and PE data to 15 minute intervals
require(dynatopmodel)
data("brompton")

rain <- aggregate_xts(brompton$rain, dt=15/60)

dynatopmodel documentation built on May 1, 2019, 7:32 p.m.