WriteMsp | R Documentation |
Write mass spectra in an msp-file (NIST format).
WriteMsp(msp_objs, output_file, fields = NULL)
msp_objs |
A list of nested lists. Each nested list is a mass spectrum. Each nested
list must contain at least three elements: (1) |
output_file |
A string. The name of a file. |
fields |
A character vector. Names of elements in an R list (not the original field
names from an msp-file) to be exported. For example, if only CAS number is
needed to be exported, the |
Names of all fields are exported in lower case. It does not cause any problem in the case of the MS Search (NIST) software (however correct operation with other software products has not been tested). Only in a few cases hash symbols and spaces are restored:
the cas_no
element is exported as the 'cas#' field;
the nist_no
element is exported as the 'nist#' field;
the num_peaks
element is exported as the 'num peaks' field.
NULL
is returned.
# Exporting mass spectra
# Only 'Name', 'SMILES', 'Formula', and 'Num Peaks' fields are exported.
WriteMsp(massbank_alkanes[1:3], "test.msp", fields = c("smiles", "formula"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.