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.
Note
Relies on the file parsers from the
Aston package to import ChemStation
.uv
and MassHunter .sp
files.
Examples
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)
}