smoothIntensitymethods  R Documentation 
This method smoothes the intensity values of a
MassSpectrum
object.
## S4 method for signature 'MassSpectrum'
smoothIntensity(object,
method=c("SavitzkyGolay", "MovingAverage"), halfWindowSize,
...)
object 

method 
used smoothing method, one of 
halfWindowSize 
half window size. The resulting
window reaches from 
... 
arguments to be passed to 
halfWindowSize
: Depends on the selected method
.
For the SavitzkyGolay
the halfWindowSize
should be smaller than
FWHM of the peaks (full width at half maximum; please find details in
Bromba and Ziegler 1981).
In general the halfWindowSize
for the MovingAverage
has to be
much smaller than for SavitzkyGolay
to conserve the peak shape.
Sebastian Gibb mail@sebastiangibb.de
Weighted moving average: Sigurdur Smarason
A. Savitzky and M. J. Golay. 1964. Smoothing and differentiation of data by simplified least squares procedures. Analytical chemistry, 36(8), 16271639.
M. U. Bromba and H. Ziegler. 1981. Application hints for SavitzkyGolay digital smoothing filters. Analytical Chemistry, 53(11), 15831586.
MassSpectrum
Website: https://strimmerlab.github.io/software/maldiquant/
## load package
library("MALDIquant")
## load example data
data("fiedler2009subset", package="MALDIquant")
## smooth spectra
s < smoothIntensity(fiedler2009subset, method="MovingAverage",
halfWindowSize=2)
## or
s < smoothIntensity(fiedler2009subset, method="MovingAverage",
halfWindowSize=2, weighted=TRUE)
## or
s < smoothIntensity(fiedler2009subset, method="SavitzkyGolay",
halfWindowSize=10)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.