## load library
library("MALDIquant");
## load example data
data("fiedler2009subset", package="MALDIquant");
## choose only the first mass spectrum
s <- fiedler2009subset[[1]];
## plot spectrum
plot(s);
## estimate baseline
b <- estimateBaseline(s);
## draw baseline on the plot
lines(b, col="red");Run the code above in your browser using DataLab