Learn R Programming

TSrepr (version 1.1.1)

repr_sma: Simple Moving Average representation

Description

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

Usage

repr_sma(x, order)

Value

the numeric vector of smoothed values of the length = length(x) - order + 1

Arguments

x

the numeric vector (time series)

order

the order of simple moving average

Author

Peter Laurinec, <[email protected]>

Examples

Run this code
repr_sma(rnorm(50), 4)

Run the code above in your browser using DataLab