## load library
library("MALDIquant");
## load example data
data("sA1", package="MALDIquant");
## choose only the first mass spectrum
s <- sA1[[1]];
## transform intensities
s <- transformIntensity(s, sqrt);
## remove baseline
s <- removeBaseline(s);
## plot spectrum
plot(s);
## estimate noise
n <- estimateNoise(s);
## draw noise on the plot
abline(h=n, col="red");Run the code above in your browser using DataLab