WriteMspFile: Write Spectra to the NIST MSP Text Format
Description
Writes all spectra in the OrgMassSpecR data frame format to
a single text file in NIST MSP format. The MSP files can be imported
into the NIST MS Search program to make a custom seachable library.
The spectra and metadata data frame format is
specified in the help files for the LibraryReport functions
in the spectral library packages, for example see
SpecLibExample::LibraryReport. The spectra data frame must
contain at least columns: filename, mz, and
intensity. The metadata data frame must contain at least columns: filename and compound.
The NAME field for each spectrum in the MSP file is assigned
based on compound in the metadata data frame.
Newlines are CR+LF since the NIST MS Search program is
Windows based.