| partial_slider {tsibble} | R Documentation |
Partially splits the input to a list according to the rolling window size.
partial_slider(.x, .size = 1, .step = 1, .fill = NA, .align = "right", .bind = FALSE) partial_pslider(..., .size = 1, .step = 1, .fill = NA, .align = "right", .bind = FALSE)
.x |
An object to slide over. |
.size |
An integer for window size. If positive, moving forward from left to right; if negative, moving backward (from right to left). |
.step |
A positive integer for calculating at every specified step instead of every single step. |
.fill |
A value to fill at the left/center/right of the data range depending
on |
.align |
Align index at the "right", "centre"/"center", or "left"
of the window. If |
.bind |
If |
... |
Additional arguments passed on to the mapped function. |
x <- c(1, NA_integer_, 3:5) slider(x, .size = 3) partial_slider(x, .size = 3)