Fit A/Ci curves with simple R scripts.
Automatic installation is easiest with devtools. Install devtools by running
install.packages("devtools")Then install this package by running
devtools::install_github("poales/msuRACiFit")Installation with devtools is highly recommended because it will automatically download the remote dependencies of this package.
There are two main ways to use this package. You can fit curves from the terminal, or fit curves using the shiny app.
The shiny app is run by executing
msuRACiFit::genApp()and is designed to mimic the feel of existing excel fitting tools while being more overall flexible - in particular, the shiny app deals much better with large datasets.
The main fitting function is fitACi. This accepts a tibble which contains the relevant columns for assimilation and Ci. The program by default looks for assimilation in the "A" column and Ci in either "pCi" or "Ci" columns, but these can be changed with arguments name_assimilation
and name_ci
. Fitting is done using minpack.lm, and can be controlled in various ways. Upper and lower bounds can be set with bound_h
and bound_l
, and values can be forced with forceValues
. By default, the program will generate guesses for the initial values of the parameters, to guide the fitting program into the correct local minimum, and reduce misfitting.
After fitting is done, the parameters can be passed on to reconstituteGraph
and reconstituteTable
to visualize and see greater detail on the quality of the fit, including which data points are fit to which limitation on photosynthesis.
If you wish to see everything all at once, the function fitComplete
will automatically generate the table and the graph for the fit.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.