powered by
collapse(data, k = 5)
x <- rnorm(500) y <- collapse(x, k = 5)
Run the code above in your browser using DataLab