Learn R Programming

tofsims (version 1.0.2)

mz,MassSpectra-method: mz getter method

Description

mz getter method

mz setter method

Usage

## S3 method for class 'MassSpectra':
mz(object)

## S3 method for class 'MassSpectra': mz(object) <- value

Arguments

object
of type MassSpectra
value
double mass to charge ratio

Value

  • MassSpectra object with updated mz slot

Examples

Run this code
library(tofsimsData)
data(tofsimsData)
## access the mz values fo each spectra point
mz(testSpectra)[1:100]
## replace a mz value
mz(testSpectra)[1] <- 0.000025
mz(testSpectra)[1:100]

Run the code above in your browser using DataLab