Learn R Programming

tofsims (version 1.0.2)

MassSpectra: Class MassSpectra

Description

Class MassSpectra is the main data container in the tofsims package as it contains the individual mass spectra.

MassSpectra is also the call to class constructor. It is used for importing high-resolution mass spectra from raw data.

Usage

MassSpectra(select = c("ulvacraw", "iontofgrd", "dummy"), analysisName, ...)

MassSpectra(select = c("ulvacraw", "iontofgrd", "dummy"), analysisName, ...)

Arguments

select
character, 'ulvacraw', 'iontofgrd', 'dummy'
analysisName
character, the (file)name of the dataset
...
additional args

Value

  • object of class MassSpectra

Details

Class MassSpectra is the main data container of the tofsims package, containing the individual mass spectra in the slot nz. Additional metadata about the analysis can be found in the slots analysisName and instrument. Values for slope and intercept of the linear mass calibration equation are stored in the slot calibration. The M/z values can be found in mz. calibration allows calculating from M/z values back to times-of-flight. The slot calibPoints is used to recalibrate the dataset. It contains a data.frame with the columns mz and TOF. The slot analysis of type list, is used as a container for data analysis objects. Typically, object of the class MassSpectra are constructed during data import using the user constructor function with the same name as the class, MassSpectra.

MassSpectra is also the call to class constructor. It is used for importing high-resolution mass spectra from raw data.

Examples

Run this code
## access rawdata in tofsims package
library(tofsimsData)
importFile<-system.file("rawdata", "trift_test_001.RAW", package = "tofsimsData")
MassSpectra('ulvacraw', importFile)
## create dummy MassSpectra object
MassSpectra('dummy')

Run the code above in your browser using DataLab