Learn R Programming

tofsims (version 1.0.2)

xySpec: Generic method xySpec

Description

Selection of Spectra

method xySpec extracts the mass spectra of positon x/y and puts them in a MassSpectar class object

Usage

xySpec(object, x = NULL, y = NULL)

## S3 method for class 'MassImage': xySpec(object, x = NULL, y = NULL)

Arguments

object
object of class MassImage
x
numeric x coordinate from where to sample a mass spectra
y
numeric y coordinate from where to sample a mass spectra

Value

  • object of class MassSpectra with selected mass spectra

Details

Selection of mass spectra by vectors of equal length for x and y.

Examples

Run this code
library(tofsimsData)
data(tofsimsData)
spectra100100<-xySpec(testImage, 100,100)
plot(spectra100100, type = 'l')

Run the code above in your browser using DataLab