Learn R Programming

MALDIquant (version 1.22.3)

isMassSpectrumList: Tests a list of MassSpectrum or MassPeaks objects.

Description

These functions test a list whether containing MassSpectrum or MassSpectrum objects.

Usage

isMassSpectrumList(x)

isMassPeaksList(x)

Value

Returns TRUE or FALSE depending on whether its argument is a list of MassSpectrum

or MassPeaks objects.

Arguments

x

object to be tested.

Author

Sebastian Gibb mail@sebastiangibb.de

See Also

MassPeaks, MassSpectrum, AbstractMassObject

Website: https://strimmerlab.github.io/software/maldiquant/

Examples

Run this code
## load package
library("MALDIquant")

## create list
p <- list()

## test list
isMassPeaksList(p) # returns FALSE

## create two MassPeaks objects and add them to the list
p <- createMassPeaks(mass=1:100, intensity=1:100,
                     metaData=list(name="example 1"))
p <- createMassPeaks(mass=1:100, intensity=1:100,
                     metaData=list(name="example 2"))

## test list
isMassPeaksList(p)    # returns TRUE
isMassSpectrumList(p) # returns FALSE

Run the code above in your browser using DataLab