Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
42 rollapply<br />
rollapply(zoo(1:5), 3, sum, align = "right")<br />
# these two are the same<br />
rollapply(zoo(1:6), list(NULL, NULL, -(2:0)), sum)<br />
rollapply(zoo(1:6), 3, sum, by = 3, align = "right")<br />
# these two are the same<br />
rollapply(zoo(1:5), list(c(-1, 1)), sum)<br />
rollapply(zoo(1:5), 3, function(x) sum(x[-2]))<br />
# these two are the same<br />
rollapply(1:5, 3, rev)<br />
embed(1:5, 3)<br />
# these four are the same<br />
x