Skip to content

Commit

Permalink
docs: update read_chemstation, etc
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanbass committed Dec 13, 2023
1 parent 9731c15 commit ae41b3c
Show file tree
Hide file tree
Showing 8 changed files with 62 additions and 21 deletions.
20 changes: 17 additions & 3 deletions R/read_chemstation_ch.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
#' Parser for reading Agilent ('.ch') files into R
#' Read 'ChemStation' CH files
#'
#' Agilent \code{.ch} files come in several different varieties. This parser
#' can automatically detect and read several versions of these files from
#' 'Agilent ChemStation' and 'OpenLab', including versions \code{30} and \code{130},
#' which are generally produced by ultraviolet detectors, as well as \code{81},
#' \code{179}, and \code{181} which are generally produced by flame ionization
#' detectors.
#'
#' @importFrom bitops bitAnd bitShiftL
#' @param path Path to \code{.ch} file
#' @param format_out Matrix or data.frame.
Expand All @@ -7,8 +15,14 @@
#' @param metadata_format Format to output metadata. Either \code{chromconverter}
#' or \code{raw}.
#' @author Ethan Bass
#' @return A chromatogram in the format specified by \code{format_out}
#' (retention time x wavelength).
#' @return A 2D chromatogram in the format specified by \code{data_format} and
#' \code{format_out}. If \code{data_format} is \code{wide}, the chromatogram will
#' be returned with retention times as rows and wavelengths as columns. If
#' \code{long} format is requested, three columns will be returned: one for the
#' retention time, one for the wavelength and one for the intensity. The
#' \code{format_out} argument determines whether the chromatogram is returned as
#' a \code{matrix} or \code{data.frame}. Metadata can be attached to the
#' chromatogram as \code{\link{attributes}} if \code{read_metadata} is {TRUE}.
#' @note This function was adapted from the
#' \href{https://github.com/chemplexity/chromatography}{Chromatography Toolbox}
#' ((c) James Dillon 2014).
Expand Down
18 changes: 13 additions & 5 deletions R/read_chemstation_uv.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#' Read 'Chemstation' DAD files
#' Read 'ChemStation' DAD files
#'
#' Parser for reading Agilent UV (.uv) files into R.
#' Agilent \code{.uv} files come in several different varieties. This parser can
#' automatically detect and read several versions of these files from
#' 'Agilent ChemStation' and 'OpenLab', including versions \code{31} and \code{131}.
#'
#' @importFrom utils head tail
#' @param path Path to \code{.uv} file.
Expand All @@ -9,12 +11,18 @@
#' @param read_metadata Logical. Whether to attach metadata.
#' @param metadata_format Format to output metadata. Either \code{chromconverter}
#' or \code{raw}.
#' @return A chromatogram in the format specified by \code{format_out}
#' (retention time x wavelength).
#' @return A 3D chromatogram in the format specified by \code{data_format} and
#' \code{format_out}. If \code{data_format} is \code{wide}, the chromatogram will
#' be returned with retention times as rows and wavelengths as columns. If
#' \code{long} format is requested, three columns will be returned: one for the
#' retention time, one for the wavelength and one for the intensity. The
#' \code{format_out} argument determines whether the chromatogram is returned as
#' a \code{matrix} or \code{data.frame}. Metadata can be attached to the
#' chromatogram as \code{\link{attributes}} if \code{read_metadata} is {TRUE}.
#' @author Ethan Bass
#' @note This function was adapted from the parser in the rainbow project
#' licensed under GPL 3 by Evan Shi
#' (https://rainbow-api.readthedocs.io/en/latest/agilent/uv.html).
#' \url{https://rainbow-api.readthedocs.io/en/latest/agilent/uv.html}.
#' @export

read_chemstation_uv <- function(path, format_out = c("matrix", "data.frame"),
Expand Down
2 changes: 1 addition & 1 deletion R/read_shimadzu_lcd.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#' Shimadzu LCD parser
#'
#' Read 3D PDA data stream from 'Shimadzu' LCD files.
#' Reads 3D PDA data stream from 'Shimadzu' LCD files.
#'
#' A parser to read PDA data from 'Shimadzu' \code{.lcd} files. LCD files are
#' encoded as 'Microsoft' OLE documents. The parser relies on the
Expand Down
2 changes: 1 addition & 1 deletion R/read_waters_raw.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#' Read 'Waters' raw
#' Read 'Waters' RAW
#'
#' Parser for reading Waters (.raw) files into R.
#'
Expand Down
19 changes: 15 additions & 4 deletions man/read_chemstation_ch.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 13 additions & 5 deletions man/read_chemstation_uv.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/read_shimadzu_lcd.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/read_waters_raw.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ae41b3c

Please sign in to comment.