## load library
library("MALDIquant");
## create list
peakList <- list();
## test list
isMassPeaksList(peakList); ## returns FALSE
## create two MassPeaks objects and add them to the list
peakList[[1]] <- createMassPeaks(mass=1:100, intensity=rnorm(100)^2,
metaData=list(name="unrealistic example 1"));
peakList[[2]] <- createMassPeaks(mass=1:100, intensity=rnorm(100)^2,
metaData=list(name="unrealistic example 2"));
## test list
isMassPeaksList(peakList); ## returns TRUERun the code above in your browser using DataLab