From ae41b3c5446b0d22f6fe25904d4ff252649dd345 Mon Sep 17 00:00:00 2001 From: Ethan Bass Date: Wed, 13 Dec 2023 10:58:19 -0500 Subject: [PATCH] docs: update read_chemstation, etc --- R/read_chemstation_ch.R | 20 +++++++++++++++++--- R/read_chemstation_uv.R | 18 +++++++++++++----- R/read_shimadzu_lcd.R | 2 +- R/read_waters_raw.R | 2 +- man/read_chemstation_ch.Rd | 19 +++++++++++++++---- man/read_chemstation_uv.Rd | 18 +++++++++++++----- man/read_shimadzu_lcd.Rd | 2 +- man/read_waters_raw.Rd | 2 +- 8 files changed, 62 insertions(+), 21 deletions(-) diff --git a/R/read_chemstation_ch.R b/R/read_chemstation_ch.R index e3022e3..3fe120f 100644 --- a/R/read_chemstation_ch.R +++ b/R/read_chemstation_ch.R @@ -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. @@ -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). diff --git a/R/read_chemstation_uv.R b/R/read_chemstation_uv.R index 340967c..0e73566 100644 --- a/R/read_chemstation_uv.R +++ b/R/read_chemstation_uv.R @@ -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. @@ -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"), diff --git a/R/read_shimadzu_lcd.R b/R/read_shimadzu_lcd.R index 60dafce..c45bd85 100644 --- a/R/read_shimadzu_lcd.R +++ b/R/read_shimadzu_lcd.R @@ -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 diff --git a/R/read_waters_raw.R b/R/read_waters_raw.R index 9f7906d..ff60280 100644 --- a/R/read_waters_raw.R +++ b/R/read_waters_raw.R @@ -1,4 +1,4 @@ -#' Read 'Waters' raw +#' Read 'Waters' RAW #' #' Parser for reading Waters (.raw) files into R. #' diff --git a/man/read_chemstation_ch.Rd b/man/read_chemstation_ch.Rd index 2cf355d..5c52314 100644 --- a/man/read_chemstation_ch.Rd +++ b/man/read_chemstation_ch.Rd @@ -2,7 +2,7 @@ % Please edit documentation in R/read_chemstation_ch.R \name{read_chemstation_ch} \alias{read_chemstation_ch} -\title{Parser for reading Agilent ('.ch') files into R} +\title{Read 'ChemStation' CH files} \usage{ read_chemstation_ch( path, @@ -25,11 +25,22 @@ read_chemstation_ch( or \code{raw}.} } \value{ -A chromatogram in the format specified by \code{format_out} -(retention time x wavelength). +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}. } \description{ -Parser for reading Agilent ('.ch') files into R +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. } \note{ This function was adapted from the diff --git a/man/read_chemstation_uv.Rd b/man/read_chemstation_uv.Rd index ac278ab..b8e121b 100644 --- a/man/read_chemstation_uv.Rd +++ b/man/read_chemstation_uv.Rd @@ -2,7 +2,7 @@ % Please edit documentation in R/read_chemstation_uv.R \name{read_chemstation_uv} \alias{read_chemstation_uv} -\title{Read 'Chemstation' DAD files} +\title{Read 'ChemStation' DAD files} \usage{ read_chemstation_uv( path, @@ -25,16 +25,24 @@ read_chemstation_uv( or \code{raw}.} } \value{ -A chromatogram in the format specified by \code{format_out} -(retention time x wavelength). +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}. } \description{ -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}. } \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}. } \author{ Ethan Bass diff --git a/man/read_shimadzu_lcd.Rd b/man/read_shimadzu_lcd.Rd index b929954..1af0ea7 100644 --- a/man/read_shimadzu_lcd.Rd +++ b/man/read_shimadzu_lcd.Rd @@ -21,7 +21,7 @@ read_shimadzu_lcd( \item{read_metadata}{Logical. Whether to attach metadata.} } \description{ -Read 3D PDA data stream from 'Shimadzu' LCD files. +Reads 3D PDA data stream from 'Shimadzu' LCD files. } \details{ A parser to read PDA data from 'Shimadzu' \code{.lcd} files. LCD files are diff --git a/man/read_waters_raw.Rd b/man/read_waters_raw.Rd index c966ea8..74e615c 100644 --- a/man/read_waters_raw.Rd +++ b/man/read_waters_raw.Rd @@ -2,7 +2,7 @@ % Please edit documentation in R/read_waters_raw.R \name{read_waters_raw} \alias{read_waters_raw} -\title{Read 'Waters' raw} +\title{Read 'Waters' RAW} \usage{ read_waters_raw( path,