Learn R Programming

itsmr (version 1.1)

smooth.ma: Apply a moving average filter

Description

Apply a moving average filter

Usage

smooth.ma(x, q)

Arguments

x
Data vector
q
Filter order

Value

  • Returns a vector the same length as x.

Details

The averaging function uses 2q+1 values.

Examples

Run this code
y = smooth.ma(strikes,2)
plotc(strikes,y)

Run the code above in your browser using DataLab