powered by
function to calculate Moving Average of a series
MovingAverage(y, W)
A new numeric vector after calculate the moving average.
a numeric vector, with respiratory data for a regularly spaced time series.
a Positive integer, the windows of Moving Average.
Zhang T, Dong X, Chen C, Wang D, Zhang XD. RespirAnalyzer: an R package for continuous monitoring of respiratory signals.
data("TestData") W <- 50 y <- MovingAverage(Data[,2],W)
Run the code above in your browser using DataLab