knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
library(bayCi) library(dplyr) library(gunit) library(units)
In this vignette we will analyze a single Rapid $A-C_i$ Response (RACiR) curve using the braycir()
(pronounced like "bracer"). The example data associted with the bayCI package comes from Stinziano et al. (2017). It contains RACiR curves from Poplar deltoides and the object is called stinziano_etal_2017
. It can accessed once bayCI is loaded into your environment.
racir
classThe braycir()
function is for fitting a single RACiR curve. The data
argument in the braycir()
function must inherit class racir
. This ensures that all required variables:
The racir()
function will make a new racir
object from a data.frame
and validate it.
df <- stinziano_etal_2017 %>% # Set units mutate( A = set_units( A, umol / m^2 / s ), Tleaf = set_units( Tleaf, degreeC ), Q = set_units( Q, umol / m^2 / s ), E = set_units( E, mol / m^2 / s ), gsc = set_units( gsw / 1.6, mol / m^2 / s ), gtc = set_units( gtc, mol / m^2 / s ), CO2_r = set_units( CO2_r, umol / mol ), CO2_s = set_units( CO2_s, umol / mol ), Pa = set_units( Pa, kPa ), Pci = set_units( Pci, Pa ) ) %>% # Following Sharkey et al. (2007), bayCi uses Pa units mutate( Pcr = set_units(CO2_r * Pa, Pa), Pcs = set_units(CO2_s * Pa, Pa), Pgsc = convert_conductance(gsc, P = Pa, Temp = Tleaf)$`umol/m^2/s/Pa` ) %>% select(A, Cr = CO2_r, Cs = CO2_s, E, gsc, gtc, Pa, Pcr) %>% filter(Cr > set_units(10, umol / mol), Cr < set_units(480, umol / mol)) rcr <- racir(df) class(rcr) rcr %>% select(A, Pcr) %>% mutate_if(is.numeric, signif, digits = 3) %>% head() %>% knitr::kable()
empty
classRaw RACiR data be corrected using a "blank" curve measured on an empty chamber. These data are passed to braycir()
using the empty
, which must inherit class empty
. This performs the same set of checks as the racir
class. The empty()
function will make a new empty
object from a data.frame
and validate it. The correction curve from Stinziano et al. (2017) comes with the bayCi package and can be accessed from stinziano_etal_2017_empty
.
df <- stinziano_etal_2017_empty %>% # Set units mutate( A = set_units( A, umol / m^2 / s ), Cr = set_units( Cr, umol / mol ), time = set_units( time, s ) ) mty <- empty(df) class(mty) mty %>% mutate_if(is.numeric, signif, digits = 3) %>% head() %>% knitr::kable()
Sharkey TD, CJ Bernacchi, GD Farquhar, EL Singsaas. 2007. Fitting photosynthetic carbon dioxide response curves for C$_3$ leaves. Plant, Cell & Environment 30(9): 1035--1040.
Stinziano JR, PB Morgan, DJ Lynch, AJ Saathoff, DK McDermitt, DT Hanson. 2017. The rapid $A-C_i$ response: photosynthesis in the phenomic era. Plant, Cell & Environment 40(8): 1256--1262.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.