as.MS2spectrum {CluMSID} | R 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")

[Package CluMSID version 1.0.0 Index]