Title: | Rapid A/Ci Response (RACiR) Data Analysis |
---|---|
Description: | Contains functions useful for reading in Licor 6800 files, correcting and analyzing rapid A/Ci response (RACiR) data. Requires some user interaction to adjust the calibration (empty chamber) data file to a useable range. Calibration uses a 1st to 5th order polynomial as suggested in Stinziano et al. (2017) <doi:10.1111/pce.12911>. Data can be processed individually or batch processed for all files paired with a given calibration file. RACiR is a trademark of LI-COR Biosciences, and used with permission. |
Authors: | Joseph Stinziano [aut, cre] |
Maintainer: | Joseph Stinziano <[email protected]> |
License: | MIT + file LICENSE |
Version: | 2.0.0 |
Built: | 2024-11-19 05:11:16 UTC |
Source: | https://github.com/jstinzi/racir |
racircal
Corrects your RACiR data based on calibration data. Produces
corrected A vs. Ci graph. Output is a data frame with corrected RACiR data
using variable names Acor and Cicor for the corrected A and Ci values.
racircal( data, caldata, mincut, maxcut, title, varnames = list(A = "A", Ca = "Ca", CO2_r = "CO2_r", E = "E", gtc = "gtc") )
racircal( data, caldata, mincut, maxcut, title, varnames = list(A = "A", Ca = "Ca", CO2_r = "CO2_r", E = "E", gtc = "gtc") )
data |
Data frame with the RACiR response data |
caldata |
Data frame with the calibration data |
mincut |
Minimum cutoff value for reference CO2 (CO2_r). Used to cut out the data from the initial chamber mixing. Default value is set to the minimum COR_r value. |
maxcut |
Maximum cutoff value for reference CO2 (CO2_r). Used to cut out the data from the end of the response. Not needed in all cases. Default value is set to the maximum COR_r value. |
title |
Title of output graph - useful for batch RACiR corrections. |
varnames |
Variable names - this allows for the use of this code with other machines and setups where variable names may differ. |
racircal returns a data frame with corrected RACiR data
#Read in data data <- read_6800(system.file("extdata", "poplar_2", package = "racir")) caldata <- read_6800(system.file("extdata", "cal", package = "racir")) #Correct data data_corrected <- racircal(data = data, caldata = caldata, mincut = 350, maxcut = 780, title = "Test")
#Read in data data <- read_6800(system.file("extdata", "poplar_2", package = "racir")) caldata <- read_6800(system.file("extdata", "cal", package = "racir")) #Correct data data_corrected <- racircal(data = data, caldata = caldata, mincut = 350, maxcut = 780, title = "Test")
racircal_advanced
Interval correction for RACiR data.
racircal_advanced( data, caldata, mincut, maxcut, title, digits, varnames = list(A = "A", Ca = "Ca", CO2_r = "CO2_r", E = "E", gtc = "gtc") )
racircal_advanced( data, caldata, mincut, maxcut, title, digits, varnames = list(A = "A", Ca = "Ca", CO2_r = "CO2_r", E = "E", gtc = "gtc") )
data |
Data frame with the RACiR response data |
caldata |
Data frame with the calibration data |
mincut |
Minimum cutoff value for reference CO2 (CO2_r). Used to cut out the data from the initial chamber mixing. Default value is set to the minimum COR_r value. |
maxcut |
Maximum cutoff value for reference CO2 (CO2_r). Used to cut out the data from the end of the response. Not needed in all cases. Default value is set to the maximum COR_r value. |
title |
Title of output graph - useful for batch RACiR corrections. |
digits |
Specifies rounding for groups. Defaults to -2 (100s). Effectively uses 100 ppm intervals (e.g. data matching >50 ppm to 150 ppm would be assigned to an interval centered around 100 ppm for reference CO2). |
varnames |
Variable names - this allows for the use of this code with other machines and setups where variable names may differ. |
racircal_advanced racircalcheck allows visual checking of RACiR calibration data
#Read in data data <- read_6800(system.file("extdata", "poplar_2", package = "racir")) caldata <- read_6800(system.file("extdata", "cal", package = "racir")) #Correct data data_corrected <- racircal_advanced(data = data, caldata = caldata, mincut = 350, maxcut = 780, digits = -2, title = "Test")
#Read in data data <- read_6800(system.file("extdata", "poplar_2", package = "racir")) caldata <- read_6800(system.file("extdata", "cal", package = "racir")) #Correct data data_corrected <- racircal_advanced(data = data, caldata = caldata, mincut = 350, maxcut = 780, digits = -2, title = "Test")
racircalbatch
Corrects your RACiR data files based on a calibration file.
Produces diagnostic graphs of A vs. Ci for quality control. Output
includes a list of data frames with corrected data.
racircalbatch( caldata, data, mincut, maxcut, title, varnames = list(A = "A", Ca = "Ca", CO2_r = "CO2_r", E = "E", gtc = "gtc") )
racircalbatch( caldata, data, mincut, maxcut, title, varnames = list(A = "A", Ca = "Ca", CO2_r = "CO2_r", E = "E", gtc = "gtc") )
caldata |
Data frame with the calibration data |
data |
List of data frames with the RACiR response data |
mincut |
Minimum cutoff value for reference CO2 (CO2_r). Used to cut out the data from the initial chamber mixing. Default value is set to the minimum COR_r value. |
maxcut |
Maximum cutoff value for reference CO2 (CO2_r). Used to cut out the data from the end of the response. Not needed in all cases. Default value is set to the maximum COR_r value. |
title |
Vector for titles of output graph - useful for batch RACiR corrections. Length must be equal to data list length |
varnames |
Variable names - this allows for the use of this code with other machines and setups where variable names may differ. |
racircalbatch calibrates a batch of RACiR data
#Create a list of files files <- c(system.file("extdata", "poplar_1", package = "racir"), system.file("extdata", "poplar_2", package = "racir")) data <- vector("list", length(files)) for(i in seq_along(files)){ data[[i]] <- read_6800(files[i]) names(data)[i] <- files[i] } caldata <- read_6800(system.file("extdata", "cal", package = "racir")) output <- racircalbatch(caldata = caldata, data = data, mincut = 300, maxcut = 780, title = files)
#Create a list of files files <- c(system.file("extdata", "poplar_1", package = "racir"), system.file("extdata", "poplar_2", package = "racir")) data <- vector("list", length(files)) for(i in seq_along(files)){ data[[i]] <- read_6800(files[i]) names(data)[i] <- files[i] } caldata <- read_6800(system.file("extdata", "cal", package = "racir")) output <- racircalbatch(caldata = caldata, data = data, mincut = 300, maxcut = 780, title = files)
racircalbatch_advanced
Corrects your RACiR data files based on a
calibration file. Produces diagnostic graphs of A vs. Ci for quality
control. Output includes a list of data frames with corrected data.
racircalbatch_advanced( caldata, data, mincut, maxcut, digits, title, varnames = list(A = "A", Ca = "Ca", CO2_r = "CO2_r", E = "E", gtc = "gtc") )
racircalbatch_advanced( caldata, data, mincut, maxcut, digits, title, varnames = list(A = "A", Ca = "Ca", CO2_r = "CO2_r", E = "E", gtc = "gtc") )
caldata |
Data frame with the calibration data |
data |
List of data frames with the RACiR response data |
mincut |
Minimum cutoff value for reference CO2 (CO2_r). Used to cut out the data from the initial chamber mixing. Default value is set to the minimum COR_r value. |
maxcut |
Maximum cutoff value for reference CO2 (CO2_r). Used to cut out the data from the end of the response. Not needed in all cases. Default value is set to the maximum COR_r value. |
digits |
Specifies rounding for groups. Defaults to -2 (100s). Effectively uses 100 ppm intervals (e.g. data matching >50 ppm to 150 ppm would be assigned to an interval centered around 100 ppm for reference CO2). |
title |
Vector for titles of output graph - useful for batch RACiR corrections. Length must be equal to data list length |
varnames |
Variable names - this allows for the use of this code with other machines and setups where variable names may differ. |
racircalbatch_advanced uses racircal_advanced on many files
#Create a list of files files <- c(system.file("extdata", "poplar_1", package = "racir"), system.file("extdata", "poplar_2", package = "racir")) data <- vector("list", length(files)) for(i in seq_along(files)){ data[[i]] <- read_6800(files[i]) names(data)[i] <- files[i] } caldata <- read_6800(system.file("extdata", "cal", package = "racir")) output <- racircalbatch_advanced(caldata = caldata, data = data, mincut = 300, maxcut = 780, title = files)
#Create a list of files files <- c(system.file("extdata", "poplar_1", package = "racir"), system.file("extdata", "poplar_2", package = "racir")) data <- vector("list", length(files)) for(i in seq_along(files)){ data[[i]] <- read_6800(files[i]) names(data)[i] <- files[i] } caldata <- read_6800(system.file("extdata", "cal", package = "racir")) output <- racircalbatch_advanced(caldata = caldata, data = data, mincut = 300, maxcut = 780, title = files)
racircalcheck
Used to check range of calibration file. Produces
diagnostic graphs of A vs. Ci for quality control. Output includes plots
for checking and confirming cutoff values, and a plot with the fit, as well
as information as to which polynomial fit the data best.
racircalcheck( data, mincut, maxcut, varnames = list(A = "A", Ca = "Ca", CO2_r = "CO2_r", E = "E", gtc = "gtc") )
racircalcheck( data, mincut, maxcut, varnames = list(A = "A", Ca = "Ca", CO2_r = "CO2_r", E = "E", gtc = "gtc") )
data |
Data frame with the calibration (empty chamber) rapid A/Ci response |
mincut |
Minimum cutoff value for reference CO2 (CO2_r). Used to cut out the data from the initial chamber mixing. Default value is set to the minimum COR_r value. |
maxcut |
Maximum cutoff value for reference CO2 (CO2_r). Used to cut out the data from the end of the response. Not needed in all cases. Default value is set to the maximum COR_r value. |
varnames |
Variable names - this allows for the use of this code with other machines and setups where variable names may differ. |
racircalcheck allows visual checking of RACiR calibration data
#Read in the file data <- read_6800(system.file("extdata", "cal", package = "racir")) #Run calibration check racircalcheck(data = data, mincut = 350, maxcut = 780)
#Read in the file data <- read_6800(system.file("extdata", "cal", package = "racir")) #Run calibration check racircalcheck(data = data, mincut = 350, maxcut = 780)
racircalcheck_advanced
Used to check range of calibration file.
Produces diagnostic graphs of A vs. Ci for quality control.
racircalcheck_advanced( data, mincut, maxcut, digits, varnames = list(A = "A", Ca = "Ca", CO2_r = "CO2_r", E = "E", gtc = "gtc") )
racircalcheck_advanced( data, mincut, maxcut, digits, varnames = list(A = "A", Ca = "Ca", CO2_r = "CO2_r", E = "E", gtc = "gtc") )
data |
Data frame with the calibration (empty chamber) rapid A/Ci response |
mincut |
Minimum cutoff value for reference CO2 (CO2_r). Used to cut out the data from the initial chamber mixing. Default value is set to the minimum COR_r value. |
maxcut |
Maximum cutoff value for reference CO2 (CO2_r). Used to cut out the data from the end of the response. Not needed in all cases. Default value is set to the maximum COR_r value. |
digits |
Specifies rounding for groups. Defaults to -2 (100s). Effectively uses 100 ppm intervals (e.g. data matching >50 ppm to 150 ppm would be assigned to an interval centered around 100 ppm for reference CO2). |
varnames |
Variable names - this allows for the use of this code with other machines and setups where variable names may differ. |
racircalcheck_advanced returns a data frame with corrected RACiR data
#Read in data data <- read_6800(system.file("extdata", "poplar_2", package = "racir")) caldata <- read_6800(system.file("extdata", "cal", package = "racir")) #Correct data racircalcheck_advanced(data = data, mincut = 350, maxcut = 780)
#Read in data data <- read_6800(system.file("extdata", "poplar_2", package = "racir")) caldata <- read_6800(system.file("extdata", "cal", package = "racir")) #Correct data racircalcheck_advanced(data = data, mincut = 350, maxcut = 780)
read_6800
Reads Li-Cor 6800 files, which are delimited by spaces and tabs.
read_6800(x)
read_6800(x)
x |
A Li-Cor 6800 data file name of the form: "mydata". |
read_6800 imports a Li-Cor 6800 file as a data frame