peak.gas: An R package for data wrangling and plotting trace gas concentrations from instantaneous output produced by benchtop instruments

Abstract

1. Some analytical scientific instruments, such as infrared gas analyzers (IRGA), elemental analyzers (EA), gas chromatographs (GC), and flow injection analyzers, provide instantaneous output of timeseries data but may require further processing by the user to estimate injected standard or sample concentrations. Such processing can be time-consuming and prone to error. Here, we developed an open-source package (peak.gas) that integrates time-series data from an IRGA, used in benchtop mode (injecting discreet samples into a carrier gas flow network), into peak areas from which concentrations can be calculated. 2. The peak.gas package was written in the open-source language R. The package is designed for users with varying degrees of familiarity with the R programming language. At its simplest, the package will produce output simply by setting a working directory and executing the function. The package can also easily plot instrument output for diagnostic purposes. There are warnings if values exceed set limits embedded in our functions that will alert the user to issues such as variations in standard performance when compared with check standards, files not properly formatted for processing, or standard curves not provided. 3. When the peak.gas package is used with the associated protocol (Appendix 1) describing benchtop use of the LI-8100A IRGA, the functions in the package will batch process a folder of text files containing sample names, date and time of recording, and carbon dioxide (CO2) concentration. The functions identify and extract analytical peaks and calculate standard curves to convert peak areas into accurate CO2 concentrations calculated by using area under the curve (AUC). The user can view any output using the plotting functions included within the package. 4. While the peak.gas package is designed to work seamlessly with the described protocol and instrumentation, it can be adapted by the user to different analytical instruments that produce similar output to the IRGA used here (sample, datetime, concentration recorded) regardless of compounds measured

    Similar works