MA: Moving average filter.

Description Usage Arguments Value Examples

View source: R/filters.R

Description

This function return the data smoothed using the basic moving average algorithm. For each chunk of data of size equal to the buffer_size parameter is calculated the average and this value is used as the i term of the newly smoothed data. zero padding is applied for initial and final values

Usage

1
MA(raw_data, buffer_size = 5)

Arguments

raw_data

Data upon which the algorithm is applied

buffer_size

number of points the algorithm use to compute the average

Value

Smoothed data using moving average algorithm

Examples

1
2
raw_data = c(1:100)
smoothed_data = MA(raw_data)

Convolutioner documentation built on March 11, 2021, 5:07 p.m.