Displaying 2 results from an estimated 2 matches for "zoo_t".
Did you mean:
foo_t
2018 Apr 24
2
Rolling window difference for zoo time series
Hi,
I have a 'zoo' time series as below :
Zoo_TS = zoo(5:1, as.Date(Sys.time())+0:4)
Now I want to calculate First order difference of order 1, rolling
window basis i.e.
(Zoo_TS[2] - Zoo_TS[1] ) / Zoo_TS[1]
(Zoo_TS[3] - Zoo_TS[2] ) / Zoo_TS[2]
.....
Is there any direct function available to achieve this?
Thanks,
2018 Apr 24
0
Rolling window difference for zoo time series
Zoo_TS/lag(Zoo_TS) - 1
On Tue, Apr 24, 2018 at 9:29 PM, Christofer Bogaso <
bogaso.christofer at gmail.com> wrote:
> Hi,
>
> I have a 'zoo' time series as below :
>
> Zoo_TS = zoo(5:1, as.Date(Sys.time())+0:4)
>
> Now I want to calculate First order difference of ord...