View source: R/preprocessing.R
mavg | R Documentation |
Smoothing, by moving average, of the row observations (e.g. spectra) of a dataset.
mavg(X, n = 5)
X |
X-data ( |
n |
The number of points (i.e. columns of |
A matrix of the transformed data.
data(cassav)
X <- cassav$Xtest
headm(X)
Xp <- mavg(X, n = 11)
headm(Xp)
oldpar <- par(mfrow = c(1, 1))
par(mfrow = c(1, 2))
plotsp(X, main = "Signal")
plotsp(Xp, main = "Corrected signal")
abline(h = 0, lty = 2, col = "grey")
par(oldpar)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.