visualizers {rTANDEM} | R Documentation

## Plot spectrum from a rTResult object

### Description

Functions like `GetTaxoFromXML("pathToXML")`, `GetParamFromXML("pathToXML")`, `GetResultsFromXML(pathToXML)` creates R object from X!Tandem-style xml files. The functions `WriteParamToXML(paramObject)` and `WriteTaxoToXML(paramObject)` will create an X!Tandem-style xml file from an R object.

### Usage

    ms2.plot(spectrum.id, result)

### Arguments

`spectrum.id` | The id of the spectrum to be plotted (from the field result@spectra$id).
`result` | A result object of class rTResult_s.

### Value

'plot.ms2' returns a plot of the spectrum.

### Examples

    require(rTANDEM)
    result <- GetResultsFromXML(
      system.file("extdata/result.xml", package="rTANDEM")
    )

    ## Get the first spectra of the dataset and plot it:
    spectrum.id <- result@spectra$id[[1]]
    ms2.plot(spectrum.id, result)

[Package rTANDEM version 1.20.0 Index]