## load package
library("MALDIquant")
## create a MassPeaks object
peaks <- createMassPeaks(mass=1:100, intensity=1:100,
metaData=list(name="example 1"))
## test
isMassPeaks(peaks) # returns TRUE
isMassSpectrum(peaks) # returns FALSE
isMassPeaks(double()) # returns FALSE
Run the code above in your browser using DataLab