powered by
slide generates a data.table with start, center, and end columns for a sliding window analysis.
slide
slide(from, to, step = 1, before = 0, after = 0)
data.table with start, center, and end columns
integer, the start of the sequence
integer, the end of the sequence
integer, the step size
integer, the number of values before the center of a window
integer, the number of values after the center of a window
slide(1, 10, step = 2, before = 1, after = 1)
Run the code above in your browser using DataLab