I am a fairly novice R user, but have been trying to do some simple missing value replacement. (Replacing an NA
with the mean of the value before and the value after the NA
)
I have been using the na_ma()
function from the imputeTS
library and it is doing exactly what I need to do.
na_ma(x , k=1, weighting = "simple")
I have applied it to a column, then a data frame and it all worked fine. I now wish to apply it to a list of data frames but it does not seem to be working.
If anyone could point me in the right direction on what my best option for this issue would be I would greatly appreciate it.