On Tue, 24 Apr 2018, Eric Berger wrote:
Zoo_TS/lag(Zoo_TS) - 1
Or:
diff(Zoo_TS, arithmetic = FALSE) - 1
On Tue, Apr 24, 2018 at 9:29 PM, Christofer Bogaso <
bogaso.christo...@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 w
Zoo_TS/lag(Zoo_TS) - 1
On Tue, Apr 24, 2018 at 9:29 PM, Christofer Bogaso <
bogaso.christo...@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 order 1, rolling
> window basis i.e
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 ac
3 matches
Mail list logo