Remove NA using weighted moving average
impute_mean_window(data = NULL, k = 2, weighting = "simple")A set of filtered time series using the imputation function.
A time series vector or matrix
A integer width of the moving average window. Expands to both sides of the center element e.g. k = 2 means 4 observations (2 left, 2 right) are taken into account. If all observations in the current window are NA, the window size is automatically increased until there are at least 2 non-NA values present
A string with the weighting strategy to be used. More details below (default is "simple").
Felipe Carlos, efelipecarlos@gmail.com
The implementation of this function was adapted from the imputeTS R
Package. The code is open-source, under the GPL license, and is available on
GitHub https://github.com/SteffenMoritz/imputeTS.