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