aggregate_xts {dynatopmodel} | R Documentation |
Takes a list of time series and resample to a new interval.
aggregate_xts(ser, dt, fun = mean)
ser |
xts Times series to aggregate |
dt |
numeric New time interval, hours |
fun |
function Function applied to aggregate the series to the new interval |
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.
Time series resampled at the new interval #' @return The list of observations resampled at the new interval.
# Resample Brompton rainfall and PE data to 15 minute intervals require(dynatopmodel) data("brompton") rain <- aggregate_xts(brompton$rain, dt=15/60)