# NOT RUN {
library(dplyr)
library(purrr)
data(annualtemps)
x <- map(1:4, ~mutate(filter(annualtemps, Year-2009==.x), idx=.x))
n <- 6
pad_frames(x, id="idx", n.period=n, rotation="add")
pad_frames(x, id="idx", n.period=n, rotation="pad")
# }
Run the code above in your browser using DataLab