Reads peak lists from specified folders or vector of paths.
read_peaklist(
paths,
find_files,
format_in = c("chemstation", "shimadzu_fid", "shimadzu_dad", "shimadzu_lcd",
"shimadzu_gcd", "chromatotec", "asm", "cdf", "openlab"),
pattern = NULL,
peaktable_format = c("chromatographr", "original"),
metadata_format = c("chromconverter", "raw"),
read_metadata = TRUE,
progress_bar = TRUE,
cl = 1,
sort_by = c("auto", "none", "acquisition_time", "file_time"),
data_format = NULL
)A peak_list: a list with one element per sample, holding its peak
table, or a list of peak tables where the file records more than one. The
tables are named by wavelength (e.g. "254") where the file records one,
and otherwise by the file's own name for the signal; a table identical to
another at the same wavelength is a copy and is left out. Each row is a
peak. Every table starts with a sample column and
a lambda column giving the signal's wavelength, which is NA for a
detector without one or a file that does not record it, followed by the
columns of peaktable_format.
Paths to files or folders containing peak list files.
Logical. Whether to treat the supplied paths as directories to search for files. Inferred if not supplied, by testing whether every path is a file.
Format of files to be imported/converted. One of
chemstation (the default), shimadzu_fid, shimadzu_dad,
shimadzu_lcd, shimadzu_gcd, chromatotec, asm, cdf (ANDI chrom) or
openlab ('Agilent OpenLab CDS' .rx files, named by signal from the
.acaml file beside them).
A pattern (e.g. a file extension). Defaults to NULL, in
which case the file extension will be deduced from format_in.
Whether to return peak tables in the standard
chromatographr layout (the default) or with all the columns the file
provides (original). A chromatographr table has the columns rt, start,
end, area, height and FWHM (the full width at half maximum), with
times in the same unit as the format's chromatograms and NA where the file
does not record a value.
Format to output metadata. Either chromconverter
(standardized field names) or raw (vendor field names, unmapped).
Logical. Whether to attach metadata. Defaults to TRUE.
Logical. Whether to show progress bar. Defaults to TRUE.
Argument to pbapply specifying the number of
parallel workers to use or a cluster object created by
makeCluster (a set of parallel R worker processes).
Defaults to 1.
How to sort the samples: auto (default) sorts files by
acquisition time unless paths lists the files explicitly or any
acquisition time is missing; none keeps files in the order given, or in
alphabetical order if find_files = TRUE; acquisition_time sorts by the
acquisition time recorded in each file (run_datetime); file_time sorts
by the time when each file was last modified.
Deprecated. Use peaktable_format instead.
Ethan Bass
path <- system.file("extdata", "benzoxazinoid_standards",
package = "chromConverter")
peak_list <- read_peaklist(path, progress_bar = FALSE)
names(peak_list)
peak_list[["BENZOS_250PPM"]][["254"]]
Run the code above in your browser using DataLab