get_indices {PAutilities} | R Documentation |
Retrieve indices for a rolling window analysis
Description
Retrieve indices for a rolling window analysis
Usage
get_indices(y_var, window_size = 15L)
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 |
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
Note
For this function, the output elements contain positions (i.e., indices) from
y_var
, whereas for rolling_groups
the output elements
contain the raw values found at each index
See Also
Examples
result <- get_indices(1:100, 10)
head(result)
tail(result)
[Package PAutilities version 1.2.1 Index]