tsibble (version 0.9.3)

slider: Splits the input to a list according to the rolling window size.

Description

Splits the input to a list according to the rolling window size.

Usage

slider(.x, .size = 1, .step = 1, .bind = FALSE)

pslider(..., .size = 1, .step = 1, .bind = FALSE)

Arguments

.x

An objects to be split.

.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.

.bind

If .x is a list or data frame, the input will be flattened to a list of data frames.

...

Multiple objects to be split in parallel.

See Also

partial_slider, partial_pslider for partial sliding