And then lapply over out.

On Mon, Jul 28, 2008 at 6:41 PM, Gabor Grothendieck
<[EMAIL PROTECTED]> wrote:
> rollapply along an index:
>
> library(zoo)
> z <- zoo(matrix(101:110, 5), 201:205)
> tt <- time(z)
> zz <- zoo(seq_along(tt), tt)
> out <- rollapply(zz, 3, function(ix) list(z[ix,]))
> str(out) # list of zoo objects
>
>
> On Mon, Jul 28, 2008 at 5:03 PM, rcoder <[EMAIL PROTECTED]> wrote:
>>
>>
>> rcoder wrote:
>>>
>>> Hi everyone,
>>>
>>> Is there a way to perform a rollapply operation on a time series data
>>> matrix and preserve the time frame? Currently, when I apply rollapply in
>>> its standart form, the date column is no longer present in the o/p matrix.
>>>
>>> Thanks,
>>>
>>> rcoder
>>>
>>
>> --
>> View this message in context: 
>> http://www.nabble.com/rollapply%28%29-opertation-on-ts-matrix-tp18694735p18699707.html
>> Sent from the R help mailing list archive at Nabble.com.
>>
>> ______________________________________________
>> R-help@r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>>
>

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to