Learn R Programming

iontree (version 1.18.0)

formatSpec: Format mass spec matrix data into a string format, or vice versa

Description

argument x is a 2-column matrix of mz and intenity, or a string format of mz-internsity paris. Character pair of mz and intensity is separated by semicolon, for example, 150 2345.6; 151 4325.67; .... which is often used to represent a mass spectrum as seen in NIST and MassBank.

Usage

formatSpec(x, fromTo = c("mat2str", "str2mat"))

Arguments

x
2-col matrix or type of character depends on "fromTo"
fromTo
type of conversion

Value

Details

References

See Also

Examples

Run this code
x="150 2345.6; 151 4325.67;"
formatSpec(x, fromTo="str2mat") 

Run the code above in your browser using DataLab