[RsR] Fwd: smart updates and rolling windows

Gabor Grothendieck ggrothend|eck @end|ng |rom gm@||@com
Sun Sep 30 04:28:03 CEST 2007


On 9/29/07, Bradford Cross <bradford.n.cross using gmail.com> wrote:
> Greetings R'ers!
>
> I have been looking for mathematics libraries for event stream processing /
> time series simulation.  Mathematics libraries for event stream processing
> require two key features; 1) "smart updates" (functions use optimal update
> algorithms, f.ex. once mean is calculated for an event stream, the
> subsequent calls to the function are computed using previous values of mean
> rather than by brute force re-calculation), 2)  "rolling calculations"
> (functions take a lag parameter for sample size, f.ex. mean of last 100
> events.)
>
> I found a couple simple summary statistics implemented like this in the zoo
> package.  I have also found implementations for smart updates in some other
> languages (apache commons math, and BOOST accumulators) but these only
> supports accumulated calculations, not rolling calculations.

I am not sure whether your last sentence was intended to apply to zoo
but zoo has several functions for rolling calculations: rollapply, rollmax,
rollmean, rollmedian .  The rollaply is quite general since you
supply the function.  The caTools package has some high performance
functions: runmean, runmin, runmax, runquantile.




More information about the R-SIG-Robust mailing list