load_chroms: Import chromatograms.

View source: R/load_chroms.R

load_chromsR Documentation

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,
  ...
)

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.

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.

Value

A list of chromatograms in matrix format.

Note

Relies on the file parsers from the Aston package to import ChemStation .uv and MassHunter .sp files.

Author(s)

Ethan Bass

Examples

## Not run: 
###  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)

## End(Not run)

chromatographR documentation built on Aug. 24, 2022, 9:06 a.m.