I am trying to make Runner returning a list of windows as follows:
1 2 3 4 5
5 6 7 8 9
9 10 11 12 13
This is the behaviour of rollapply as in the following example
require(zoo)
TS <- zoo(c(1:20))
rollapply(TS, width = 5, by = 4, FUN = print, align = "left")
I thought I could get the same results using the lag argument in runner
list1<-runner(
x=c(1:20),
k = 5,
lag=4,
simplify = F
)
list2<-runner(
x=c(1:20),
k = 5,
lag=-4,
simplify = F
)
What am I missing or is this feature not available?
Thanks
I am trying to make Runner returning a list of windows as follows:
1 2 3 4 5
5 6 7 8 9
9 10 11 12 13
This is the behaviour of
rollapplyas in the following exampleI thought I could get the same results using the
lagargument inrunnerWhat am I missing or is this feature not available?
Thanks