Skip to content
Prev 207139 / 398503 Next

Problem on results of runmean function

Hello R specialists,
I am using the runmean function to get the moving averages of a time serie.
Here is the code that I enter:
 ma<-runmean(na.remove(myTimeSerie),20,align="right",endrule="NA")
I get the vector that I want except for one detail: the first 20 values are
supposed to be NAs but I get a value at the 10th element while it should be
a NA value as well. Any idea about what it could be? 
Anna