SubsampleSeries.R: Sub-sample a time series based on another time series and...

Description Usage Arguments Value

Description

A high-resolution sequence is subsampled so that its data points match that of a lower-resolution sequence. These sequences will usually be time series but don't have to be. The high-resolution sequence is binned such that the bin centres are at the points of the low-resolution data and all high resolution data within a single bin is averaged.

Usage

1
SubsampleSeries(x.hres, y.hres, x.lres, func = mean, testplot = FALSE)

Arguments

x.hres

Sequence or array of high-resolution x-axis data points This may be a series of POSIX datetimes If x.hres == 'test' then args are ignored and test run

y.hres

Corresponding sequence of high-resolutuon y values x.lres: Sequence of low-resolution x values. Must be some overlap between x.hres and x.lres

func

Function to apply to the aggregate command over each bin Default is mean

testplot

If True then create a plot to test data. Always happens if x.hres == 'test'. Default is FALSE

Value

y.lres Rebinned y values for each x.lres point


freyasquires/noxpro documentation built on May 23, 2019, 7:33 a.m.