Learn R Programming

chromatographR (version 0.4.4)

load_chroms: Import chromatograms.

Description

Convenience function to import chromatograms from a list of folders or paths.

Usage

load_chroms(
  paths,
  find_files = TRUE,
  format.in = c("csv", "chemstation", "masshunter"),
  sep = ",",
  dat = NULL,
  ...
)

Value

A list of chromatograms in matrix format.

Arguments

paths

Path(s) to chromatograms or the folders containing the files

find_files

Logical. Set to TRUE (default) if you are providing the function with a folder or vector of folders containing the files. Otherwise, set toFALSE.

format.in

Format of files.

sep

Argument provided to read.csv. Defaults to ",".

dat

Optional list of chromatograms. If provided, newly imported chromatograms will be appended to the existing list.

...

Additional arguments to read.csv.

Author

Ethan Bass

Details

Chromatograms may be CSVs, ChemStation .uv files, or MassHunter .sp files. Parsers from the Aston package for python are used to load binary files.

Examples

Run this code
if (FALSE) {
###  import from single folder
dat <- load_chromes(paths = path)
### import from multiple folders
path = 'foo'
folders <- list.files(path = path, pattern = "EXPORT3D")
dat <- load_chroms(folders)
}

Run the code above in your browser using DataLab