fit_photosynthetic_induction_A_multiple_curves: A function that fits multiple curves for A of a...

View source: R/fit_photosynthetic_induction_A_multiple_curves.R

fit_photosynthetic_induction_A_multiple_curvesR Documentation

A function that fits multiple curves for A of a photosynthetic induction.

Description

A function that fits multiple curves for A of a photosynthetic induction. It fits the data from the point where the light changes. It calculates A1, A2 and deltaA. It uses nls to fit the data. You can check if the fit is good. It returns a list with all the parameters it used to fit the line. These include A1, A2, deltaA, other constands and t50. If the model gave a warning or error then the parameter values are NA.

It only accepts licor files that have every input parameter stable except changing the light once. Commonly made with a timed lamp autoprogram with only two steps.The dataframe has to contain A, elapsed and Qin.

Usage

fit_photosynthetic_induction_A_multiple_curves(
  dataframe,
  mean_width = 50,
  fit_width = 0,
  title = "Photosynthetic induction A curve",
  subtitle = "",
  show_try = FALSE,
  save_plot = FALSE,
  save_path = "output_directory_licorfiles/photosynthetic_induction_A_plots/"
)

Arguments

dataframe

A dataframe from which to calculate the fit parameters.

mean_width

An integer of how many points to use for the means.

fit_width

An integer of how many points to use for the fit. If fit_width is smaller than mean_width then it takes all points.

title

A string for the title of the plot

manual_check

A boolean to regulate if you want to manual check the data

Value

Returns a list of the check state, A1, A2, deltaA, other constands and t50

Author(s)

Sam Loontjens

Examples

  parameters <- fit_photosynthetic_induction_A_curve(mydata,
                                                     "data from today")


SamLoontjens/HandlingLicorFiles documentation built on Nov. 14, 2023, 6:32 a.m.