Title: | Enhancing Capabilities of 'plantecophys' |
---|---|
Description: | Provides wrapping functions to add to capabilities to 'plantecophys' (Duursma, 2015, <doi:10.1371/journal.pone.0143346>). Key added capabilities include temperature responses of mesophyll conductance (gm, gmeso), apparent Michaelis-Menten constant for rubisco carboxylation in air (Km, Kcair),and photorespiratory CO2 compensation point (GammaStar) for fitting A-Ci or A-Cc curves for C3 plants (for temperature responses of gm, Km, & GammaStar, see Bernacchi et al., 2002, <doi:10.1104/pp.008250>; for theory on fitting A-Ci or A-Cc curves, see Farquhar et al., 1980; <doi:10.1007/BF00386231>, von Caemmerer, 2000, ISBN:064306379X; Ethier & Livingston, 2004 <doi:10.1111/j.1365-3040.2004.01140.x>; and Gu et al., 2010, <doi:10.1111/j.1365-3040.2010.02192.x>). Includes the ability to fit the Arrhenius and modified Arrhenius temperature response functions (see Medlyn et al., 2002, <doi:10.1046/j.1365-3040.2002.00891.x>) for maximum rubisco carboxylation rates (Vcmax) and maximum electron transport rates (Jmax) (see Farquhar et al., 1980; <doi:10.1007/BF00386231>). |
Authors: | Joseph Stinziano [aut, cre] , Demi Gamble [aut], Robert Sharwood [aut], Warren Conaty [aut] |
Maintainer: | Joseph Stinziano <[email protected]> |
License: | MIT + file LICENSE |
Version: | 1.0.5 |
Built: | 2024-11-24 03:25:14 UTC |
Source: | https://github.com/jstinzi/plantecowrap |
Extracts coefficients from fitacis2
acisummary(data, group1, group2 = NA, group3 = NA, fits)
acisummary(data, group1, group2 = NA, group3 = NA, fits)
data |
data frame with A/Ci curve data |
group1 |
grouping variable 1, must match fitacis2 |
group2 |
grouping variable 2, must match fitacis2 |
group3 |
grouping variable 3, must match fitacis2 |
fits |
list output from fitacis2 |
acisummary produces a data frame with A-Ci coefficients. If the input data have failed curve fits, these need to be removed before running acisummary().
#Read in data data <- read.csv(system.file("extdata", "example_2.csv", package = "plantecowrap"), stringsAsFactors = FALSE) #Run ACi curve fitting fits <- fitacis2(data, group1 = "Grouping", varnames = list(ALEAF = "A", Tleaf = "Tleaf", Ci = "Ci", PPFD = "PPFD", Rd = "Rd", Press = "Press"), fitmethod = "bilinear", fitTPU = TRUE, Tcorrect = FALSE) #Extract coefficients outputs <- acisummary(data, group1 = "Grouping", fits = fits)
#Read in data data <- read.csv(system.file("extdata", "example_2.csv", package = "plantecowrap"), stringsAsFactors = FALSE) #Run ACi curve fitting fits <- fitacis2(data, group1 = "Grouping", varnames = list(ALEAF = "A", Tleaf = "Tleaf", Ci = "Ci", PPFD = "PPFD", Rd = "Rd", Press = "Press"), fitmethod = "bilinear", fitTPU = TRUE, Tcorrect = FALSE) #Extract coefficients outputs <- acisummary(data, group1 = "Grouping", fits = fits)
The Arrhenius temperature response equation
arrhenius(Ea, Tleaf)
arrhenius(Ea, Tleaf)
Ea |
activation energy in kJ mol-1 |
Tleaf |
leaf temperature in Celsius |
arrhenius is an exponential temperature response model. This function automatically converts temperature from Celsius to Kelvin for the calculation. REFERENCE Arrhenius S. 1915. Quantitative laws in biological chemistry. Bell.
Fitting the temperature responses of Vcmax and Jmax
fit_topt_VJ( data, varnames = list(Vcmax = "Vcmax", Jmax = "Jmax", Tleaf = "Tleaf"), title = NULL, limit_jmax = 1e+05, limit_vcmax = 1e+05, ... )
fit_topt_VJ( data, varnames = list(Vcmax = "Vcmax", Jmax = "Jmax", Tleaf = "Tleaf"), title = NULL, limit_jmax = 1e+05, limit_vcmax = 1e+05, ... )
data |
Dataframe containing Vcmax (maximum rubisco carboxylation capacity in umol m-2 s-1), Jmax (maximum photosynthetic electron transport to CO2 fixation in umol m-2 s-1), and Tleaf (leaf temperature in Celsius) |
varnames |
Variable names to account for different spellings of Vcmax, Jmax, and Tleaf. |
title |
Graph title, usually a group name |
limit_jmax |
Upper limit to Jmax values for fitting. Defaults to 100,000 umol m-2 s-1 as this is the "nonsense output" from fitaci. Ensures that these points are not fit. |
limit_vcmax |
Upper limit to Vcmax values for fitting. Defaults to 100,000 umol m-2 s-1. |
... |
Arguments to be passed on to minpack.lm::nlsLM(). See ?nlsLM for details. |
fit_topt_VJ fits the Topt modified Arrhenius function to Vcmax and Jmax data. Note that Hd may max out at 3000 kJ mol-1 for Jmax and 2000 kJ mol-1 for Vcmax. REFERENCE Medlyn BE, Dreyer E, Ellsworth D, Forstreuter M, Harley PC, Kirschbaum MUF, Le Roux X, Montpied P, Strassemeyer J, Walcroft A, Wang K, Loutstau D. 2002. Temperature response of parameters of a biochemically based model of photosynthesis. II. A review of experimental data. Plant Cell Environ 25:1167-1179
#Read in data data <- read.csv(system.file("extdata", "example_1.csv", package = "plantecowrap"), stringsAsFactors = FALSE) #Fit ACi Curves then fit temperature responses fits <- fitacis2(data = data, varnames = list(ALEAF = "A", Tleaf = "Tleaf", Ci = "Ci", PPFD = "PPFD", Rd = "Rd", Press = "Press"), group1 = "Treat", fitTPU = FALSE, fitmethod = "bilinear", gm25 = 10000, Egm = 0) #Extract coefficients outputs <- acisummary(data, group1 = "Treat", fits = fits) #Fit temperature response tresp <- fit_topt_VJ(outputs) #View plot tresp[[3]]
#Read in data data <- read.csv(system.file("extdata", "example_1.csv", package = "plantecowrap"), stringsAsFactors = FALSE) #Fit ACi Curves then fit temperature responses fits <- fitacis2(data = data, varnames = list(ALEAF = "A", Tleaf = "Tleaf", Ci = "Ci", PPFD = "PPFD", Rd = "Rd", Press = "Press"), group1 = "Treat", fitTPU = FALSE, fitmethod = "bilinear", gm25 = 10000, Egm = 0) #Extract coefficients outputs <- acisummary(data, group1 = "Treat", fits = fits) #Fit temperature response tresp <- fit_topt_VJ(outputs) #View plot tresp[[3]]
Fitting multiple temperature response curves
fit_topt_VJs( data, group, varnames = list(Vcmax = "Vcmax", Jmax = "Jmax", Tleaf = "Tleaf"), limit_jmax = 1e+05, limit_vcmax = 1e+05, ... )
fit_topt_VJs( data, group, varnames = list(Vcmax = "Vcmax", Jmax = "Jmax", Tleaf = "Tleaf"), limit_jmax = 1e+05, limit_vcmax = 1e+05, ... )
data |
Dataframe with multiple temperature response curves for Vcmax (maximum rubisco carboxylation capacity in umol m-2 s-1) and Jmax (maximum photosynthetic electron transport to CO2 fixation in umol m-2 s-1). |
group |
Grouping variable to use, e.g. Plant ID |
varnames |
Variable names. Reassigns variable names to account for different spellings of Vcmax, Jmax, and Tleaf |
limit_jmax |
Upper limit to Jmax values for fitting. Defaults to 100,000 umol m-2 s-1 as this is the "nonsense output" from fitaci. Ensures that these points are not fit. |
limit_vcmax |
Upper limit to Vcmax values for fitting. Defaults to 100,000 umol m-2 s-1. |
... |
Arguments to be passed on to minpack.lm::nlsLM via fit_topt_VJ(). See ?nlsLM for details. |
fit_topt_VJs fits multiple Vcmax and Jmax temperature responses using the optimum temperature response model from Medlyn et al. 2002. REFERENCE Medlyn BE, Dreyer E, Ellsworth D, Forstreuter M, Harley PC, Kirschbaum MUF, Le Roux X, Montpied P, Strassemeyer J, Walcroft A, Wang K, Loutstau D. 2002. Temperature response of parameters of a biochemically based model of photosynthesis. II. A review of experimental data. Plant Cell Environ 25:1167-1179
#Read in data data <- read.csv(system.file("extdata", "example_2.csv", package = "plantecowrap"), stringsAsFactors = FALSE) #Fit ACi Curves then fit temperature responses fits <- fitacis2(data = data, varnames = list(ALEAF = "A", Tleaf = "Tleaf", Ci = "Ci", PPFD = "PPFD", Rd = "Rd", Press = "Press"), group1 = "Grouping", fitTPU = FALSE, fitmethod = "bilinear", gm25 = 10000, Egm = 0) #Extract coefficients outputs <- acisummary(data, group1 = "Grouping", fits = fits) #Plot curve fits for (i in 1:length(fits)) { plot(fits[[i]]) } #Separate out grouping variable outputs <- separate(outputs, col = "ID", c("Treat", "Block"), sep = "_") #Fit the Topt model from Medlyn et al. 2002 for all individuals #Output is a list of lists for each individual #There is also a fit_topt_VJ for single temperature response #fitting out <- fit_topt_VJs(data = outputs, group = "Block", #this grouping variable is for #each individual varnames = list(Vcmax = "Vcmax", Jmax = "Jmax", Tleaf = "Tleaf"), limit_jmax = 100000, limit_vcmax = 100000) #Let's get the parameters out into a single data frame pars <- get_t_pars(out) #Let's get the graphs out into a list #You can get a graph using: graph[1] graphs <- get_t_graphs(out)
#Read in data data <- read.csv(system.file("extdata", "example_2.csv", package = "plantecowrap"), stringsAsFactors = FALSE) #Fit ACi Curves then fit temperature responses fits <- fitacis2(data = data, varnames = list(ALEAF = "A", Tleaf = "Tleaf", Ci = "Ci", PPFD = "PPFD", Rd = "Rd", Press = "Press"), group1 = "Grouping", fitTPU = FALSE, fitmethod = "bilinear", gm25 = 10000, Egm = 0) #Extract coefficients outputs <- acisummary(data, group1 = "Grouping", fits = fits) #Plot curve fits for (i in 1:length(fits)) { plot(fits[[i]]) } #Separate out grouping variable outputs <- separate(outputs, col = "ID", c("Treat", "Block"), sep = "_") #Fit the Topt model from Medlyn et al. 2002 for all individuals #Output is a list of lists for each individual #There is also a fit_topt_VJ for single temperature response #fitting out <- fit_topt_VJs(data = outputs, group = "Block", #this grouping variable is for #each individual varnames = list(Vcmax = "Vcmax", Jmax = "Jmax", Tleaf = "Tleaf"), limit_jmax = 100000, limit_vcmax = 100000) #Let's get the parameters out into a single data frame pars <- get_t_pars(out) #Let's get the graphs out into a list #You can get a graph using: graph[1] graphs <- get_t_graphs(out)
Fit A-Ci curves with custom kinetics
fitacis2( data, group1, group2 = NA, group3 = NA, gm25 = 0.08701, Egm = 47.65, K25 = 718.4, Ek = 65.50828, Gstar25 = 42.75, Egamma = 37.83, fitmethod = "default", fitTPU = TRUE, Tcorrect = FALSE, useRd = FALSE, citransition = NULL, alphag = 0, PPFD = NULL, Tleaf = NULL, alpha = 0.24, theta = 0.85, varnames = list(ALEAF = "Photo", Tleaf = "Tleaf", Ci = "Ci", PPFD = "PARi", Rd = "Rd", Press = "Press"), ... )
fitacis2( data, group1, group2 = NA, group3 = NA, gm25 = 0.08701, Egm = 47.65, K25 = 718.4, Ek = 65.50828, Gstar25 = 42.75, Egamma = 37.83, fitmethod = "default", fitTPU = TRUE, Tcorrect = FALSE, useRd = FALSE, citransition = NULL, alphag = 0, PPFD = NULL, Tleaf = NULL, alpha = 0.24, theta = 0.85, varnames = list(ALEAF = "Photo", Tleaf = "Tleaf", Ci = "Ci", PPFD = "PARi", Rd = "Rd", Press = "Press"), ... )
data |
data frame with A/Ci curves. Requires net CO2 assimilation (Anet/Photo/ALEAF in umol m-2 s-1), leaf temperature (Tleaf in Celsius), intercellular CO2 concentration (Ci, in umol mol-1), incident irradiance on the leaf (PPFD/PARi in umol m-2 s-1), atmospheric pressure (Patm/Press in kPa), and (optional, set useRd = TRUE for this option) respiration (Rd, in umol m-2 s-1). |
group1 |
grouping variable 1, could be species, temperature, ID |
group2 |
grouping variable 2 |
group3 |
grouping variable 3 |
gm25 |
mesophyll conductance at 25 Celsius in mol m-2 s-1 bar-1 |
Egm |
activation energy of mesophyll conductance in kJ mol-1 |
K25 |
Km in 21 in umol mol-1 (equivalent to ubar bar-1) |
Ek |
activation energy of Kcair in kJ mol-1 |
Gstar25 |
photorespiratory CO2 compensation point at 25 Celsius in umol mol-1 (equivalent to ubar bar-1) |
Egamma |
activation energy of GammaStar in kJ mol-1 |
fitmethod |
Set to either "bilinear" or "default". Default option in this package is "default". See ?fitaci in plantecophys for more details. |
fitTPU |
Should TPU limitations be fit? Set to TRUE/FALSE. See ?fitaci in plantecophys for more details. |
Tcorrect |
Should outputs be temperature corrected? Default here is FALSE. See ?fitaci in plantecophys for more details. |
useRd |
Should respiration be used? Default is FALSE. See ?fitaci in plantecophys for more details. |
citransition |
Pre-specify Ci transition point? Units in umol mol-1 (ubar bar-1) Default is FALSE. See ?fitaci in plantecophys for more details. |
alphag |
Fraction of photorespiratory glycolate carbon that is not returned to the chloroplast (von Caemmerer, 2000). If ACi curves show high-CO2 decline, then this value should be > 0. See ?fitaci in plantecophys for more details. |
PPFD |
Light intensity? Can be retrieved from dataframe. Default is NULL. Units are umol m-2 s-1. See ?fitaci in plantecophys for more details. |
Tleaf |
Leaf temperature? Can be retrieved from dataframe. Default is NULL. Units are Celsius. See ?fitaci in plantecophys for more details. |
alpha |
Quantum yield of electron transport. Default is 0.24. Units are umol electrons / umol incident photons. See ?fitaci in plantecophys for more details. |
theta |
Curvature of the photosynthetic light response. Default is 0.85. If light response has sharper transition, increase up to 1. If light response has shallower curves, decrease towards 0. See ?fitaci in plantecophys for more details. |
varnames |
Variable names in your dataframe. ALEAF is net CO2 assimilation in umol m-2 s-1, Tleaf is leaf temperature in Celsius, Ci is intercellular CO2 concentration in umol mol-1, PPFD is light intensity in umol m-2 s-1, Rd is respiration rate in umol m-2 s-1, and Press is atmospheric pressure in kPa. See ?fitaci in plantecophys for more details. |
... |
Further arguments for plantecophys::fitaci(). See ?fitaci for details. |
fitacis2 allows gmeso, GammaStar, and Km to vary with Tleaf. Output matches the fitacis function from plantecophys. Note that the temperature response function of Km is derived from the temperature responses of Ko and Kc in Bernacchi et al.2001, as is the GammaStar temperature response defaults. The gm defaults are from Bernacchi et al. 2002 fitted between 1and 35 Celsius. Also note that this ALWAYS uses gm. To fit data on a "Ci-basis", set gm25 really high (e.g. 10000 mol m-2 s-1 bar-1) and Egm to 0 kJ mol-1.
In some instances (e.g. very low stomatal conductance), fitacis2 will fail. In these cases, the output for that curve will be "Failed", rather than an A-Ci curve fit object.
REFERENCES Bernacchi CJ, Singsaas EL, Pimentel C, Portis AR, Long SP. 2001. Improved temperature response functions for models of rubisco-limited photosynthesis. Plant Cell Environment 24:253-259. Bernacchi CJ, Portis AR, Nakano H, von Caemmerer S, Long SP. 2002. Temperature response of mesophyll conductance. Implications for the determination of rubisco enzyme kinetics and for limitations to photosynthesis in vivo. Plant Physiology 130:1992-1998. von Caemmerer S. 2000. Biochemical models of leaf photosynthesis. CSIRO Publishing, Collingwood.
#Read in data data <- read.csv(system.file("extdata", "example_2.csv", package = "plantecowrap"), stringsAsFactors = FALSE) #Run ACi curve fitting fits <- fitacis2(data, group1 = "Grouping", varnames = list(ALEAF = "A", Tleaf = "Tleaf", Ci = "Ci", PPFD = "PPFD", Rd = "Rd", Press = "Press"), fitmethod = "bilinear", fitTPU = TRUE, Tcorrect = FALSE)
#Read in data data <- read.csv(system.file("extdata", "example_2.csv", package = "plantecowrap"), stringsAsFactors = FALSE) #Run ACi curve fitting fits <- fitacis2(data, group1 = "Grouping", varnames = list(ALEAF = "A", Tleaf = "Tleaf", Ci = "Ci", PPFD = "PPFD", Rd = "Rd", Press = "Press"), fitmethod = "bilinear", fitTPU = TRUE, Tcorrect = FALSE)
Get temperature response graphs
get_t_graphs(data)
get_t_graphs(data)
data |
List of data output from fit_topt_VJs |
get_t_graphs returns temperature response graphs for Vcmax and Jmax from the group fitting process. Output is a list of graphs.
#Read in data data <- read.csv(system.file("extdata", "example_2.csv", package = "plantecowrap"), stringsAsFactors = FALSE) #Fit ACi Curves then fit temperature responses fits <- fitacis2(data = data, varnames = list(ALEAF = "A", Tleaf = "Tleaf", Ci = "Ci", PPFD = "PPFD", Rd = "Rd", Press = "Press"), group1 = "Grouping", fitTPU = FALSE, fitmethod = "bilinear", gm25 = 10000, Egm = 0) #Extract coefficients outputs <- acisummary(data, group1 = "Grouping", fits = fits) #Plot curve fits for (i in 1:length(fits)) { plot(fits[[i]]) } #Separate out grouping variable outputs <- separate(outputs, col = "ID", c("Treat", "Block"), sep = "_") #Fit the Topt model from Medlyn et al. 2002 for all individuals #Output is a list of lists for each individual #There is also a fit_topt_VJ for single temperature response #fitting out <- fit_topt_VJs(data = outputs, group = "Block", #this grouping variable is for #each individual varnames = list(Vcmax = "Vcmax", Jmax = "Jmax", Tleaf = "Tleaf"), limit_jmax = 100000, limit_vcmax = 100000) #Let's get the graphs out into a list #You can get a graph using: graph[1] graphs <- get_t_graphs(out)
#Read in data data <- read.csv(system.file("extdata", "example_2.csv", package = "plantecowrap"), stringsAsFactors = FALSE) #Fit ACi Curves then fit temperature responses fits <- fitacis2(data = data, varnames = list(ALEAF = "A", Tleaf = "Tleaf", Ci = "Ci", PPFD = "PPFD", Rd = "Rd", Press = "Press"), group1 = "Grouping", fitTPU = FALSE, fitmethod = "bilinear", gm25 = 10000, Egm = 0) #Extract coefficients outputs <- acisummary(data, group1 = "Grouping", fits = fits) #Plot curve fits for (i in 1:length(fits)) { plot(fits[[i]]) } #Separate out grouping variable outputs <- separate(outputs, col = "ID", c("Treat", "Block"), sep = "_") #Fit the Topt model from Medlyn et al. 2002 for all individuals #Output is a list of lists for each individual #There is also a fit_topt_VJ for single temperature response #fitting out <- fit_topt_VJs(data = outputs, group = "Block", #this grouping variable is for #each individual varnames = list(Vcmax = "Vcmax", Jmax = "Jmax", Tleaf = "Tleaf"), limit_jmax = 100000, limit_vcmax = 100000) #Let's get the graphs out into a list #You can get a graph using: graph[1] graphs <- get_t_graphs(out)
Get temperature response parameters
get_t_pars(data)
get_t_pars(data)
data |
List of data output from fit_topt_VJs |
get_t_pars returns temperature response parameters for Vcmax and Jmax from the group fitting process. Output is a dataframe.
#Read in data data <- read.csv(system.file("extdata", "example_2.csv", package = "plantecowrap"), stringsAsFactors = FALSE) #Fit ACi Curves then fit temperature responses fits <- fitacis2(data = data, varnames = list(ALEAF = "A", Tleaf = "Tleaf", Ci = "Ci", PPFD = "PPFD", Rd = "Rd", Press = "Press"), group1 = "Grouping", fitTPU = FALSE, fitmethod = "bilinear", gm25 = 10000, Egm = 0) #Extract coefficients outputs <- acisummary(data, group1 = "Grouping", fits = fits) #Plot curve fits for (i in 1:length(fits)) { plot(fits[[i]]) } #Separate out grouping variable outputs <- separate(outputs, col = "ID", c("Treat", "Block"), sep = "_") #Fit the Topt model from Medlyn et al. 2002 for all individuals #Output is a list of lists for each individual #There is also a fit_topt_VJ for single temperature response #fitting out <- fit_topt_VJs(data = outputs, group = "Block", #this grouping variable is for #each individual varnames = list(Vcmax = "Vcmax", Jmax = "Jmax", Tleaf = "Tleaf"), limit_jmax = 100000, limit_vcmax = 100000) #Let's get the parameters out into a single data frame pars <- get_t_pars(out)
#Read in data data <- read.csv(system.file("extdata", "example_2.csv", package = "plantecowrap"), stringsAsFactors = FALSE) #Fit ACi Curves then fit temperature responses fits <- fitacis2(data = data, varnames = list(ALEAF = "A", Tleaf = "Tleaf", Ci = "Ci", PPFD = "PPFD", Rd = "Rd", Press = "Press"), group1 = "Grouping", fitTPU = FALSE, fitmethod = "bilinear", gm25 = 10000, Egm = 0) #Extract coefficients outputs <- acisummary(data, group1 = "Grouping", fits = fits) #Plot curve fits for (i in 1:length(fits)) { plot(fits[[i]]) } #Separate out grouping variable outputs <- separate(outputs, col = "ID", c("Treat", "Block"), sep = "_") #Fit the Topt model from Medlyn et al. 2002 for all individuals #Output is a list of lists for each individual #There is also a fit_topt_VJ for single temperature response #fitting out <- fit_topt_VJs(data = outputs, group = "Block", #this grouping variable is for #each individual varnames = list(Vcmax = "Vcmax", Jmax = "Jmax", Tleaf = "Tleaf"), limit_jmax = 100000, limit_vcmax = 100000) #Let's get the parameters out into a single data frame pars <- get_t_pars(out)
Fitting the peaked Arrhenius temperature response model
modarrhenius(Ea, Hd, dS, Tleaf)
modarrhenius(Ea, Hd, dS, Tleaf)
Ea |
activation energy in kJ mol-1 |
Hd |
deactivation energy in kJ mol-1 |
dS |
entropy of deactivation in kJ mol-1 |
Tleaf |
leaf temperature in Celsius |
modarrhenius is used to fit a peaked Arrhenius model. REFERENCE Medlyn BE, Dreyer E, Ellsworth D, Forstreuter M, Harley PC, Kirschbaum MUF, Le Roux X, Montpied P, Strassemeyer J, Walcroft A, Wang K, Loutstau D. 2002. Temperature response of parameters of a biochemically based model of photosynthesis. II. A review of experimental data. Plant Cell Environ 25:1167-1179
Printing graphs from a list of graphs
print_graphs(data, path, height = 5, width = 5, res = 600, units = "in", ...)
print_graphs(data, path, height = 5, width = 5, res = 600, units = "in", ...)
data |
List of graphs to output as .jpeg files |
path |
File path for printing out graphs. Use "./" to set to current working directory. |
height |
Height of output graphs. Defaults to 5. |
width |
Width of output graphs. Defaults to 5. |
res |
Resolution of output graphs. Defaults to 600. |
units |
Units of height and width. Defaults to "in". |
... |
Further arguments, specifically for jpeg(). |
print_graphs creates jpeg files from a list of graphs based on the graph names. Used in combination with get_t_graphs. Output is a series of .jpeg files in the working directory.
#Read in data data <- read.csv(system.file("extdata", "example_2.csv", package = "plantecowrap"), stringsAsFactors = FALSE) #Fit ACi Curves then fit temperature responses fits <- fitacis2(data = data, varnames = list(ALEAF = "A", Tleaf = "Tleaf", Ci = "Ci", PPFD = "PPFD", Rd = "Rd", Press = "Press"), group1 = "Grouping", fitTPU = FALSE, fitmethod = "bilinear", gm25 = 10000, Egm = 0) #Extract coefficients outputs <- acisummary(data, group1 = "Grouping", fits = fits) #Plot curve fits for (i in 1:length(fits)) { plot(fits[[i]]) } #Separate out grouping variable outputs <- separate(outputs, col = "ID", c("Treat", "Block"), sep = "_") #Fit the Topt model from Medlyn et al. 2002 for all individuals #Output is a list of lists for each individual #There is also a fit_topt_VJ for single temperature response #fitting out <- fit_topt_VJs(data = outputs, group = "Block", #this grouping variable is for #each individual varnames = list(Vcmax = "Vcmax", Jmax = "Jmax", Tleaf = "Tleaf"), limit_jmax = 100000, limit_vcmax = 100000) #Let's get the graphs out into a list #You can get a graph using: graph[1] graphs <- get_t_graphs(out) #Print graphs out as jpegs into folder print_graphs(graphs, path = tempdir())
#Read in data data <- read.csv(system.file("extdata", "example_2.csv", package = "plantecowrap"), stringsAsFactors = FALSE) #Fit ACi Curves then fit temperature responses fits <- fitacis2(data = data, varnames = list(ALEAF = "A", Tleaf = "Tleaf", Ci = "Ci", PPFD = "PPFD", Rd = "Rd", Press = "Press"), group1 = "Grouping", fitTPU = FALSE, fitmethod = "bilinear", gm25 = 10000, Egm = 0) #Extract coefficients outputs <- acisummary(data, group1 = "Grouping", fits = fits) #Plot curve fits for (i in 1:length(fits)) { plot(fits[[i]]) } #Separate out grouping variable outputs <- separate(outputs, col = "ID", c("Treat", "Block"), sep = "_") #Fit the Topt model from Medlyn et al. 2002 for all individuals #Output is a list of lists for each individual #There is also a fit_topt_VJ for single temperature response #fitting out <- fit_topt_VJs(data = outputs, group = "Block", #this grouping variable is for #each individual varnames = list(Vcmax = "Vcmax", Jmax = "Jmax", Tleaf = "Tleaf"), limit_jmax = 100000, limit_vcmax = 100000) #Let's get the graphs out into a list #You can get a graph using: graph[1] graphs <- get_t_graphs(out) #Print graphs out as jpegs into folder print_graphs(graphs, path = tempdir())
Fitting the Topt temperature response model
toptfit(Ea, Hd, kopt, Tleaf, Topt)
toptfit(Ea, Hd, kopt, Tleaf, Topt)
Ea |
activation energy in kJ mol-1 |
Hd |
deactivation energy in kJ mol-1 |
kopt |
parameter value at optimum temperature |
Tleaf |
leaf temperature in Celsius |
Topt |
optimum leaf temperature in Celsius |
toptfit is the Topt temperature response model. REFERENCE Medlyn BE, Dreyer E, Ellsworth D, Forstreuter M, Harley PC, Kirschbaum MUF, Le Roux X, Montpied P, Strassemeyer J, Walcroft A, Wang K, Loutstau D. 2002. Temperature response of parameters of a biochemically based model of photosynthesis. II. A review of experimental data. Plant Cell Environ 25:1167-1179