TSrepr (version 1.0.4)

repr_sma: Simple Moving Average representation

Description

The repr_sma computes Simple Moving Average (SMA) from a time series.

Usage

repr_sma(x, order)

Arguments

x

the numeric vector (time series)

order

the order of simple moving average

Value

the numeric vector of smoothed values

Examples

Run this code
# NOT RUN {
repr_sma(rnorm(50), 4)

# }

Run the code above in your browser using DataLab