toMassbank: Write MassBank record into character array

Description Usage Arguments Details Value Note Author(s) References See Also Examples

Description

Writes a MassBank record in list format to a text array.

Usage

1
toMassbank(mbdata)

Arguments

mbdata

A MassBank record in list format.

Details

The function is a general conversion tool for the MassBank format; i.e. the field names are not fixed. mbdata must be a named list, and the entries can be as follows:

Value

The result is a text array, which is ready to be written to the disk as a file.

Note

The function iterates over the list item names. This means that duplicate entries in mbdata are (partially) discarded! The correct way to add them is by making a character array (as specified above): Instead of 'CH\$NAME' = 'bla', 'CH\$NAME' = 'blub' specify 'CH\$NAME' = c('bla','blub').

Author(s)

Michael Stravs

References

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

See Also

compileRecord, mbWorkflow

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
# Read just the compound info skeleton from the Internet for some compound ID
id <- 35
mbdata <- gatherData(id)
#' # Export the mbdata blocks to line arrays 
# (there is no spectrum information, just the compound info...)
mbtext <- toMassbank(mbdata)

## End(Not run)

RMassBank documentation built on Nov. 8, 2020, 6:06 p.m.