Skip to contents

Reads peak lists from specified folders or vector of paths.

Usage

read_peaklist(
  paths,
  find_files,
  format_in = c("chemstation", "shimadzu_fid", "shimadzu_dad"),
  pattern = NULL,
  data_format = c("chromatographr", "original"),
  metadata_format = c("chromconverter", "raw"),
  read_metadata = TRUE,
  progress_bar,
  cl = 1
)

Arguments

paths

paths to files or folders containing 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 to be imported/converted. Current options include: chemstation or shimadzu.

pattern

pattern (e.g. a file extension). Defaults to NULL, in which case file extension will be deduced from format_in.

data_format

Either chromatographr or original.

metadata_format

Format to output metadata. Either chromconverter or raw.

read_metadata

Logical, whether to attach metadata (if it's available). Defaults to TRUE.

progress_bar

Logical. Whether to show progress bar. Defaults to TRUE if pbapply is installed.

cl

Argument to pbapply specifying the number of clusters to use or a cluster object created by makeCluster. Defaults to 1.

Value

A list of chromatograms in matrix or data.frame format, according to the value of format_out.

Author

Ethan Bass

Examples

if (FALSE) { # interactive()
path <- "tests/testthat/testdata/dad1.uv"
chr <- read_chroms(path, find_files = FALSE, format_in = "chemstation_uv")
}