aggregate_xts {dynatopmodel}R Documentation

Resample observation data at a new time interval

Description

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

Usage

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

# Resample Brompton rainfall and PE data to 15 minute intervals
require(dynatopmodel)
data("brompton")

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

[Package dynatopmodel version 1.2.1 Index]