export,AbstractMassObject-method {MALDIquantForeign} | R Documentation |
Export files
Description
This function provides a general interface to export
AbstractMassObject-class
objects (e.g.
MassSpectrum-class
,
MassPeaks-class
)
into different file formats.
Usage
## S4 method for signature 'AbstractMassObject'
export(x, file, type="auto", force=FALSE, ...)
## S4 method for signature 'list'
export(x, path, type, force=FALSE, ...)
Arguments
x |
a |
file |
|
type |
|
force |
|
path |
|
... |
arguments to be passed to specific export functions. |
Details
Specific export functions:
tab | exportTab |
csv | exportCsv |
imzML | exportImzMl |
msd | exportMsd |
mzML | exportMzMl |
Author(s)
Sebastian Gibb
References
https://strimmerlab.github.io/software/maldiquant/
See Also
MassPeaks-class
,
MassSpectrum-class
Examples
## 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)
[Package MALDIquantForeign version 0.14.1 Index]