| export,AbstractMassObject-method | R Documentation |
This function provides a general interface to export
AbstractMassObject-class objects (e.g.
MassSpectrum-class,
MassPeaks-class)
into different file formats.
## S4 method for signature 'AbstractMassObject'
export(x, file, type="auto", force=FALSE, ...)
## S4 method for signature 'list'
export(x, path, type, force=FALSE, ...)
x |
a |
file |
|
type |
|
force |
|
path |
|
... |
arguments to be passed to specific export functions. |
Specific export functions:
| tab | exportTab |
| csv | exportCsv |
| imzML | exportImzMl |
| msd | exportMsd |
| mzML | exportMzMl |
Sebastian Gibb
https://strimmerlab.github.io/software/maldiquant/
MassPeaks-class,
MassSpectrum-class
## Not run:
library("MALDIquant")
library("MALDIquantForeign")
s <- list(createMassSpectrum(mass=1:5, intensity=1:5),
createMassSpectrum(mass=1:5, intensity=1:5))
## export a single spectrum
export(s[[1]], file="spectrum.csv")
## identical to exportCsv(s[[1]], file="spectrum.csv")
## export a list of spectra
export(s, path="spectra", type="csv")
## identical to exportCsv(s, path="spectra")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.