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