Message-ID: <CAP+bYWCZ5SQDUCB4cY6rg2ta97fh6+0237O1E4LvS=w58DwLrg@mail.gmail.com>
Date: 2011-12-24T05:55:40Z
From: Hasan Diwan
Subject: Optimising timeboxing in xts
I don't know if timeboxing is the correct term to use to accomplish
what I'm attempting, so allow me to explain. I have a set n of tagged
observations in time series t. What I'm interested in is taking i
seconds before and after every n. My code is below:
# observations.xts is an xts time series and arg is the number of
seconds to for the timebox
timeboxes <- sapply(c(1:as.numeric(last(index(observations.xts))-arg)),
function(x) { return(observations.xts[index(x) - arg, index(x)+arg])},
simplify=TRUE)
What I'd like to see in timeboxes is observations.xts elements with
timestamps within the range of abs(arg).
--
Sent from my mobile device
Envoyait de mon portable