Skip to content
Prev 8883 / 15274 Next

Rolling through fixed-length time windows

On Mon, Nov 7, 2011 at 8:50 AM, Matthew Clegg <matthewcleggphd at gmail.com> wrote:
The rollapply slowdown was reported and fixed in the development
version of zoo already. It only affected recent versions of zoo since
rollapply was rewritten to add certain features. See:

http://r.789695.n4.nabble.com/zoo-performance-regression-noticed-1-6-5-is-faster-tt3990753.html#a3993387

Certainly zoo indexing can be expensive and in those cases that do
involve indexing in an inner loop, replacing zoo object z with zc <-
coredata(z) and tt <- time(z) speeds things up.  Typically that covers
fewer computations than you might think because most R code takes the
whole object approach.