Learn R Programming

PAutilities (version 1.1.0)

get_indices: Retrieve indices for a rolling window analysis

Description

Retrieve indices for a rolling window analysis

Usage

get_indices(y_var, window_size = 15L)

Value

a list in which each element contains window_size consecutive integers that indicate which elements of y_var would be extracted for that roll of the window

Arguments

y_var

NumericVector. Input on which to define the indices for each roll of the window

window_size

int. The size of the window

See Also

rolling_groups

Examples

Run this code
result <- get_indices(1:100, 10)
head(result)
tail(result)

Run the code above in your browser using DataLab