powered by
The repr_sma computes Simple Moving Average (SMA) from a time series.
repr_sma
repr_sma(x, order)
the numeric vector (time series)
the order of simple moving average
the numeric vector of smoothed values of the length = length(x) - order + 1
# NOT RUN { repr_sma(rnorm(50), 4) # }
Run the code above in your browser using DataLab