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

_______________________________________________
R-SIG-Finance@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should 
go.

Reply via email to