mavg | R Documentation |

Smoothing, by moving average, of the row observations (usually spectra) of a data set.

`mavg(X, n = 3)`

`X` |
A |

`n` |
The number of points (i.e. columns of |

A matrix.

```
data(datcass)
X <- datcass$Xu
n <- 11
zX <- mavg(X, n)
headm(X)
headm(zX)
oldpar <- par(mfrow = c(1, 1))
par(mfrow = c(1, 2))
plotsp(X, main = "Signal")
plotsp(zX, main = "Corrected signal")
par(oldpar)
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.