Fit photosynthetic models with gas-exchange data

  .model = "default",
  .vars = NULL,
  .method = "ls",
  quiet = FALSE,
  brm_options = NULL



A data frame containing plant ecophysiological data. See required_variables() for the variables required for each model.


A character string of photosynthesis function to call. One of: aq_response, r_light.


A character string of model name to use. See get_all_models().


A list to rename variables in .data. See required_variables() for the accepted variable names.


A character string of the statistical method to use: 'ls' for least-squares and 'brms' for Bayesian model using brms::brm(). Default is 'ls'.


Additional arguments passed to specific models. See specific help pages for each type of photosynthetic model:


Flag. Should messages be suppressed? Default is FALSE.


A list of options passed to brms::brm() if .method = "brms". Default is NULL.


A fitted model object

  • class 'lm' or 'nls' if method = 'ls'

  • class 'brmsfit' if method = 'brms'


This function will fit models to data but several methods require post-processing to extract meaningful parameter estimates and confidence intervals. See vignettes for further explanation and examples.