read_chemstation_ch {chromConverter} | R Documentation |
Read 'Agilent ChemStation' CH files
Description
Reads 'Agilent ChemStation' .ch
files.
Usage
read_chemstation_ch(
path,
format_out = c("matrix", "data.frame", "data.table"),
data_format = c("wide", "long"),
read_metadata = TRUE,
metadata_format = c("chromconverter", "raw"),
scale = TRUE
)
Arguments
path |
Path to 'Agilent' |
format_out |
Class of output. Either |
data_format |
Whether to return data in |
read_metadata |
Logical. Whether to attach metadata. Defaults to |
metadata_format |
Format to output metadata. Either |
scale |
Whether to scale the data by the scaling factor present in the
file. Defaults to |
Details
'Agilent' .ch
files come in several different formats. This parser
can automatically detect and read several versions of these files from
'Agilent ChemStation' and 'Agilent OpenLab', including versions 30
and
130
, which are generally produced by ultraviolet detectors, as well as
81
, 179
, and 181
which are generally produced by flame
ionization (FID) detectors.
Value
A 2D chromatogram in the format specified by data_format
and
format_out
. If data_format
is wide
, the chromatogram will
be returned with retention times as rows and a single column for the intensity.
If long
format is requested, two columns will be returned: one for the
retention time and one for the intensity. The format_out
argument
determines whether the chromatogram is returned as a matrix
,
data.frame
, or data.table
. Metadata can be attached to the
chromatogram as attributes
if read_metadata
is TRUE
.
Note
This function was adapted from the Chromatography Toolbox (© James Dillon 2014).
Author(s)
Ethan Bass
See Also
Other 'Agilent' parsers:
read_agilent_d()
,
read_agilent_dx()
,
read_chemstation_csv()
,
read_chemstation_ms()
,
read_chemstation_reports()
,
read_chemstation_uv()
Examples
read_chemstation_ch("tests/testthat/testdata/chemstation_130.ch")