Skip to content
Back to formatted view

Raw Message

Message-ID: <4D231B82.4080307@braverock.com>
Date: 2011-01-04T13:07:14Z
From: Brian G. Peterson
Subject: Applying function on rolling window basis ** not	rollapply() function in zoo
In-Reply-To: <015f01cbac12$30753e90$915fbbb0$@gmail.com>

On 01/04/2011 07:20 AM, Bogaso Christofer wrote:
> Hi all, in the zoo package there is a function rollapply() to apply some
> fixed function on rolling window basis. I am looking for some same sort of
> function on **temporal sampling basis** means, I would like to apply a
> function say mean() for data window of length 30 like observations for 1:30,
> 31:60, . so on.


?period.apply  # for time series based apply

?apply.rolling # to apply with a fixed (rolling) width

or maybe the 'by' argument of rollapply.

   - Brian