Learn R Programming

tsapp (version 1.0.4)

moveav: moveav smoothes a time series by moving averages

Description

moveav smoothes a time series by moving averages

Usage

moveav(y, q)

Arguments

y

the series, a vector or a time series

q

scalar, span of moving average

Value

g vector, smooth component

Examples

Run this code
# 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