powered by
moveav
moveav smoothes a time series by moving averages
moveav(y, q)
the series, a vector or a time series
scalar, span of moving average
g vector, smooth component
# NOT RUN { data(GDP) g <- moveav(GDP,12) # } # NOT RUN { plot(GDP) ; lines(g,col="red") # }
Run the code above in your browser using DataLab