MA {Convolutioner} | R Documentation |
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
MA(raw_data, buffer_size = 5)
raw_data |
Data upon which the algorithm is applied |
buffer_size |
number of points the algorithm use to compute the average |
Smoothed data using moving average algorithm
raw_data = c(1:100) smoothed_data = MA(raw_data)