Re: [R] Calculate a function repeatedly over sections of a ts object

2012-01-30 Thread Jorge Molinos
Thank you very much Mike. The script is working now. Jorge From: R. Michael Weylandt [michael.weyla...@gmail.com] Sent: 30 January 2012 04:29 To: Jorge Molinos; r-help Subject: Re: [R] Calculate a function repeatedly over sections of a ts object

Re: [R] Calculate a function repeatedly over sections of a ts object

2012-01-29 Thread R. Michael Weylandt
should be different as I have it verify >> by doing the SDF step by step using the same values for the arguments within >> the function): >> >>         especlist1.7048 >> 1978(20)    1.998068e-06 >> 1979(20)    1.998068e-06 >> 1980(20)    1.998068e-06 >> 1981(2

Re: [R] Calculate a function repeatedly over sections of a ts object

2012-01-29 Thread R. Michael Weylandt
; 1979(20)    1.998068e-06 > 1980(20)    1.998068e-06 > 1981(20)    1.998068e-06 > 1982(20)    1.998068e-06 > 1983(20)    1.998068e-06 > 1984(20)    1.998068e-06 > 1985(20)    1.998068e-06 > 1986(20)    1.998068e-06 > 1987(20)    1.998068e-06 > > Thanks a lot. > > Jorge >

Re: [R] Calculate a function repeatedly over sections of a ts object

2012-01-27 Thread Jorge Molinos
ction repeatedly over sections of a ts object On Thu, Jan 26, 2012 at 4:00 PM, R. Michael Weylandt wrote: > I'm not sure if it's easily doable with a ts class, but the rollapply > function in the zoo package will do this easily. (Also, I find zoo to > be a much more natural time

Re: [R] Calculate a function repeatedly over sections of a ts object

2012-01-26 Thread Gabor Grothendieck
On Thu, Jan 26, 2012 at 4:00 PM, R. Michael Weylandt wrote: > I'm not sure if it's easily doable with a ts class, but the rollapply > function in the zoo package will do this easily. (Also, I find zoo to > be a much more natural time-series workflow than ts so it might make > the rest of your life

Re: [R] Calculate a function repeatedly over sections of a ts object

2012-01-26 Thread R. Michael Weylandt
I'm not sure if it's easily doable with a ts class, but the rollapply function in the zoo package will do this easily. (Also, I find zoo to be a much more natural time-series workflow than ts so it might make the rest of your life easier as well) Michael On Thu, Jan 26, 2012 at 2:24 PM, Jorge Mol

[R] Calculate a function repeatedly over sections of a ts object

2012-01-26 Thread Jorge Molinos
Hi, I want to apply a function (in my case SDF; package “sapa”) repeatedly over discrete sections of a daily time series object by sliding a time window of constant length (e.g. 10 consecutive years or 1825 days) over the entire ts at increments of 1 time unit (e.g. 1 year or 365 days). So for