tsEvaFillSeries {RtsEva} | R Documentation |
Fill missing values in a time series using a moving average approach.
Description
This function takes a vector of timestamps and a corresponding series with missing values, and fills the missing values by taking the average of the surrounding values.
Usage
tsEvaFillSeries(timeStamps, series)
Arguments
timeStamps |
A vector of timestamps. |
series |
A vector representing the time series with missing values. |
Value
A vector with missing values filled using a moving average approach.
Examples
timeStamps <- c(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
series <- c(1, 2, NA, 4, 5, NA, 7, 8, NA, 10)
filledSeries <- tsEvaFillSeries(timeStamps, series)
filledSeries
[Package RtsEva version 1.0.0 Index]