Rolling Mean¶
Computes the rolling mean over a numeric vector.
Usage¶
rolling_mean(x, window_size, min_periods = window_size, assume_finite = FALSE)
Parameters¶
Parameter |
Description |
|---|---|
|
A numeric vector of type double. |
|
Positive integer window length. |
|
Minimum number of non- |
|
If |
Returns¶
A numeric vector with rolling mean values.
Examples¶
x <- as.double(c(1, 2, 3, 4))
rolling_mean(x, 3L)