msc.peaks.read.csv {caMassClass}R Documentation

Read and Write Mass Spectra Peaks in CSV Format

Description

Functions to read and write CSV (comma separated values) text files containing peaks in the format used by Ciphergen's peak file.

Usage

  X = msc.peaks.read.csv(fname)
  msc.peaks.write.csv(fname, X)

Arguments

fname either a character string naming a file or a connection.
X Peak information. A data-frame in the same format as returned by msc.peaks.find, containing five components:
  • Spectrum.Tag - sample name of each peak
  • Spectrum. - sample number of each peak
  • Peak. - peak number within each sample
  • Intensity - peak height (intensity)
  • Substance.Mass - x-axis position, or corresponding mass of the peak measured in M/Z

Value

Function msc.peaks.read.csv returns peak information data frame. See argument X above. Function msc.peaks.write.csv does not return anything.

Author(s)

Jarek Tuszynski (SAIC) jaroslaw.w.tuszynski@saic.com

See Also

msc.peaks.find and msc.peaks.align

Examples

  example("msc.peaks.find") # create peak data
  X = Peaks                 # Peak data is stored in variable 'Peaks'
  msc.peaks.write.csv("peaks.csv", X)
  X = msc.peaks.read.csv("peaks.csv")
  file.remove("peaks.csv")
  stopifnot(X==Peaks)

[Package caMassClass version 1.0 Index]