as.MS2spectrum: Convert spectra from 'MSnbase' classes

View source: R/classes_methods.R

as.MS2spectrumR Documentation

Convert spectra from MSnbase classes

Description

Convert spectra from MSnbase classes

Usage

as.MS2spectrum(x)

Arguments

x

An object of class Spectrum or Spectrum2

Value

An object of class MS2spectrum

Examples

#Load a "Spectrum2" object from MSnbase
library(MSnbase)
sp <- itraqdata[["X1"]]
#Convert this object to "MS2spectrum" class
new_sp <- as.MS2spectrum(sp)
#Or alternatively:
new_sp <- as(sp, "MS2spectrum")


tdepke/CluMSID documentation built on April 10, 2022, noon