Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

AbstractMassObject-class

Class "AbstractMassObject"


Description

AbstractMassObject is an abstract (means pure virtual) class. It is the parent class of MassSpectrum and MassPeaks. It shouldn't create or handle by the user because it is for internal use only.

Derived classes

Slots

mass:

numeric, mass or mass-to-charge ratio

intensity:

numeric, intensities for measured mass-to-charge ratios

metaData:

list, some metadata to describe the spectrum

Methods

[

signature(x = "AbstractMassObject", i = "numeric"): Extracts a range of an AbstractMassObject object and returns a new one.

as.matrix

signature(x = "AbstractMassObject"): Converts an AbstractMassObject object to a matrix with 2 columns (mass, intensity).

coordinates

signature(object = "AbstractMassObject"): Accessor function for coordinates stored in object generated from imaging mass spectrometry data.

coordinates<-

signature(object = "AbstractMassObject", value = "numeric|matrix") Replacement function for coordinates used in imaging mass spectrometry datasets.

intensity

signature(object = "AbstractMassObject"): Accessor function for slot intensity.

intensity<-

signature(object = "AbstractMassObject", value = "numeric") Replacement function for slot intensity.

isEmpty

signature(object = "AbstractMassObject"): Returns TRUE if length of intensity is 0 or all intensity values are 0.

length

signature(x = "AbstractMassObject"): Returns length of slot intensity.

lines

signature(x = "AbstractMassObject"): Extented function for adding AbstractMassObject object as a line to a specific plot. See lines for details.

mass

signature(object = "AbstractMassObject"): Accessor function for slot mass.

mass<-

signature(object = "AbstractMassObject", value = "numeric") Replacement function for slot mass.

mz

signature(object = "AbstractMassObject"): Accessor function for slot mass.

mz<-

signature(object = "AbstractMassObject", value = "numeric") Replacement function for slot mass.

metaData

signature(object = "AbstractMassObject"): Accessor function for slot metaData.

metaData<-

signature(object = "AbstractMassObject"): Replacement function for slot metaData.

plot

signature(x = "AbstractMassObject", y = "missing"): Extented function for plotting an AbstractMassObject object. See plot,AbstractMassObject,missing-method for details.

points

signature(x = "AbstractMassObject"): Extented function for adding AbstractMassObject object as points to a specific plot. See points for details.

trim

signature(object = "AbstractMassObject", range = "numeric"): Trim an AbstractMassObject object. See trim,AbstractMassObject,numeric-method for details.

transformIntensity

signature(object = "AbstractMassObject"): Transforms the intensities of an AbstractMassObject object. See transformIntensity,AbstractMassObject-method for details.

Author(s)

Sebastian Gibb mail@sebastiangibb.de

See Also

Examples

## load package
library("MALDIquant")

## create example spectrum
s <- createMassSpectrum(mass=1:10, intensity=11:20,
                        metaData=list(name="Example Spectrum"))

## get intensity
intensity(s)

## get mass
mass(s)

## get metaData
metaData(s)

## replace metaData
metaData(s) <- list(name="Spectrum")

## trim spectrum
trim(s, c(2, 9))

## select a range
s[3:6]

MALDIquant

Quantitative Analysis of Mass Spectrometry Data

v1.19.3
GPL (>= 3)
Authors
Sebastian Gibb [aut, cre] (<https://orcid.org/0000-0001-7406-4443>), Korbinian Strimmer [ths] (<https://orcid.org/0000-0001-7917-2056>)
Initial release
2019-05-12

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.