Rolling Minimum¶
Computes the rolling minimum over a numeric vector using a monotonic deque.
Usage¶
rolling_min(x, window_size, min_periods = window_size)
Parameters¶
Parameter |
Description |
|---|---|
|
A numeric vector of type double. |
|
Positive integer window length. |
|
Minimum number of non- |
Returns¶
A numeric vector with rolling minimum values.
Examples¶
x <- as.double(c(1, 3, 2, 5, 4))
rolling_min(x, 3L)