as.MS2spectrum: Convert spectra from 'MSnbase' classes

Description Usage Arguments Value Examples

View source: R/classes_methods.R

Description

Convert spectra from MSnbase classes

Usage

1

Arguments

x

An object of class Spectrum or Spectrum2

Value

An object of class MS2spectrum

Examples

1
2
3
4
5
6
7
#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")

CluMSID documentation built on Nov. 8, 2020, 7:46 p.m.