exportMassbank {RMassBank} | R Documentation

## Export internally stored MassBank data to files

### Description

Exports MassBank recfile data arrays and corresponding molfiles to physical files on hard disk, for one compound.

### Usage

    exportMassbank(compiled, files, molfile)

### Arguments

`compiled` | Is ONE "compiled" entry, i.e. ONE compound with e.g. 14 spectra, as returned from `compileRecord`.
`files` | A n-membered array (usually a return value from `lapply(toMassbank)`), i.e. contains n plain-text arrays with MassBank records.
`molfile` | A molfile from `createMolfile`

### Details

The data from `compiled` is still used here, because it contains the "visible" accession number. In the plain-text format contained in `files`, the accession number is not "accessible" anymore since it's in the file.

### Value

No return value.

### Note

An improvement would be to write the accession numbers into `names(compiled)` and later into `names(files)` so `compiled` wouldn't be needed here anymore. (The compound ID would have to go into `names(molfile)`, since it is also retrieved from `compiled`.)

### Author(s)

Michael Stravs

### References

MassBank record format: http://www.massbank.jp/manuals/MassBankRecord_en.pdf

### See Also

`createMolfile`, `compileRecord`, `toMassbank`, `mbWorkflow`

### Examples

    ## Not run:
    		compiled <- compileRecord(record, mbdata, refilteredRcSpecs)
    		mbfiles <- toMassbank(compiled)
    		molfile <- createMolfile(compiled[[1]][["CH$SMILES"]])
    		exportMassbank(compiled, mbfiles, molfile)

    ## End(Not run)

[Package RMassBank version 2.8.0 Index]