mav: Compute the moving average, exponential average or running...

Description Usage Arguments Details Value Examples

View source: R/smoother1.R

Description

Use this function to compute any of these three moving average methods. These are the simplest smoothers available in the package so it may be a good idea to start initial testing with this function.

Usage

1
mav(input, len = 10, method)

Arguments

input

Time series data to use for computation

len

An integer to determine the number of datapoints used for computation

method

String. Determines the method of computation. Permissible values are exponential, simple and median

Details

For an overview of the package capabilities, click here rpatrec.

Value

Vector containing the smoothed time series data of length of input less length of len

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
#create a standard HS pattern:
a <- generator()
#add noise to this patterns
b <- noise(a,'white',10)
#smooth to regain the signal
c <- kernel(b,2)

## End(Not run)
##simply test the smoother
mav(1:10,5,'exponential')

rpatrec documentation built on May 1, 2019, 11:17 p.m.