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

Description Usage Arguments Author(s) Examples

View source: R/formatSpec.R

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

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

Arguments

x

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

fromTo

type of conversion

Author(s)

Mingshu Cao

Examples

1
2
x="150 2345.6; 151 4325.67;"
formatSpec(x, fromTo="str2mat") 

Example output

Loading required package: rJava
Loading required package: RSQLite
Loading required package: XML
      mz   inten
[1,] 150 2345.60
[2,] 151 4325.67

iontree documentation built on May 2, 2018, 2:55 a.m.