Learn R Programming

specmine (version 1.0)

read_ms_spectra: Read MS spectra

Description

Read the data from the MS files and creates the dataset.

Usage

read_ms_spectra(folder.name, type = "undefined", filename.meta = NULL, description = "", prof.method = "bin", fwhm = 30, bw = 30, intvalue = "into", header.col.meta = TRUE, header.row.meta = TRUE, sep.meta = ",")

Arguments

folder.name
string containing the path of the data folder.
type
type of the data.
filename.meta
name of the metadata file.
description
a short text describing the dataset.
prof.method
profmethod parameter from xcmsSet function from xcms package.
fwhm
fwhm parameter from xcmsSet function from xcms package. A commonly used value is 30 (seconds) for LC-MS and 4 (seconds) for GC-MS spectra.
bw
bw parameter from group function from xcms package.
intvalue
value parameter from groupval function from xcms package. It can be:
  • "into" - integrated area of original (raw) peak
  • "intf" - integrated area of filtered peak.
  • "maxo" - maximum intensity of original (raw) peak.
  • "maxf" - maximum intensity of filtered peak.

header.col.meta
boolean value indicating if the metadata CSV file contains a header column with the name of the metadata variables.
header.row.meta
boolean value indicating if the metadata CSV file contains a header row with the name of the samples.
sep.meta
the separator character of the metadata file.

Value

Returns a dataset from the MS files.

Examples

Run this code
## Not run: 
#   ## Example of reading a dataset from MS files
#   dataset = read_ms_spectra("data", type = "nmr-spectra", "metadata.csv", 
# 	    description = "description of the dataset")
# ## End(Not run)

Run the code above in your browser using DataLab