xySpec {tofsims} | R Documentation

## 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)

    ## S4 method for signature '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

### Details

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

### Value

object of class MassSpectra with selected mass spectra

### Author(s)

Lorenz Gerber <lorenz.gerber@slu.se>

### Examples

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

[Package tofsims version 1.16.0 Index]