Type: | Package |
Title: | Fast and Efficient Processing of PAM Data |
Version: | 1.0.2 |
URL: | https://github.com/biotoolbox/pam |
BugReports: | https://github.com/biotoolbox/pam/issues |
Description: | Processing Chlorophyll Fluorescence & P700 Absorbance data generated by WALZ hardware. Four models are provided for the regression of Pi curves, which can be compared with each other in order to select the most suitable model for the data set. Control plots ensure the successful verification of each regression. Bundled output of alpha, ETRmax, Ik etc. enables fast and reliable further processing of the data. |
License: | GPL-3 |
Encoding: | UTF-8 |
Suggests: | testthat (≥ 3.0.0) |
Config/testthat/edition: | 3 |
RoxygenNote: | 7.3.2 |
Imports: | rlang, data.table, dplyr, ggplot2, minpack.lm, cowplot, gridExtra, ggthemes |
NeedsCompilation: | no |
Packaged: | 2025-02-25 09:04:06 UTC; julien |
Author: | Julien Böhm |
Maintainer: | Julien Böhm <julien.boehm@uni-rostock.de> |
Repository: | CRAN |
Date/Publication: | 2025-02-25 09:30:02 UTC |
Combined ETR Plot and Summary Table
Description
Generates a plot of ETR data with different regression model predictions and a summary table.
Usage
combo_plot_control(title, data, model_results, name_list, color_list)
Arguments
title |
Character. Plot title. |
data |
Data frame. ETR and PAR data. |
model_results |
List. Regression data and parameters. |
name_list |
List. Names for models (legend and table). |
color_list |
List. Colors for model lines. |
Details
A detailed documentation can be found under https://github.com/biotoolbox/pam?tab=readme-ov-file#combo_control_plot.
Value
A plot with ETR data, regression results, and a summary table.
#' @examples path <- file.path(system.file("extdata", package = "pam"), "20240925.csv") data <- read_dual_pam_data(path)
model_results_eilers_peeters <- eilers_peeters_generate_regression_ETR_I(data) model_results_platt <- platt_generate_regression_ETR_I(data) model_results <- list(eilers_peeters_modified(model_results), platt_modified(model_results)) name_list <- c("Eilers-Peeters", "Platt") color_list <- c("red", "pink") plot <- combo_plot_control("test", data, model_results, name_list, color_list)
Compare Regression Models for ETR I
Description
Compares multiple regression models for electron transport rate (ETR) data using predefined performance metrics.
Usage
compare_regression_models_ETR_I(data_dir)
Arguments
data_dir |
A character string specifying the directory containing input data files. |
Details
This function compares the performance of the following models:
Eilers-Peeters (1988)
Platt (1980)
Vollenweider (1965)
Walsby (1997)
Models are ranked based on the deviation between observed and predicted values. The results guide users in selecting the most appropriate model for their dataset. Start values for parameters cannot be adjusted within this function. A detailed documentation can be found under https://github.com/biotoolbox/pam?tab=readme-ov-file#walsby_modified
Value
A vector with total points assigned to each regression model based on their performance. Models are ranked as follows:
1st place: 3 points
2nd place: 2 points
3rd place: 1 point
4th place: 0 points
If regression is not possible for a model, no points are awarded for any of the models for the respective file.
References
Eilers, P. H. C., & Peeters, J. C. H. (1988). A model for the relationship between light intensity and the rate of photosynthesis in phytoplankton. Ecological Modelling, 42(3-4), 199-215. Available at: doi: 10.1016/0304-3800(88)90057-9
Platt, T., Gallegos, C. L., & Harrison, W. G. (1980). Photoinhibition of photosynthesis in natural assemblages of marine phytoplankton. Journal of Marine Research, 38(4). Available at: https://elischolar.library.yale.edu/journal_of_marine_research/1525/.
Romoth, K., Nowak, P., Kempke, D., Dietrich, A., Porsche, C., & Schubert, H. (2019). Acclimation limits of Fucus evanescens along the salinity gradient of the southwestern Baltic Sea. Botanica Marina, 62(1), 1-12. Available at: doi: 10.1515/bot-2018-0098.
Vollenweider, R. A. (1965). Calculation models of photosynthesis-depth curves and some implications regarding day rate estimates in primary production measurements. In C. R. Goldman (Ed.), Primary Productivity in Aquatic Environments (pp. 427-457). Mem. Ist. Ital. Idrobiol., 18 Suppl., University of California Press, Berkeley.
Walsby, A. E. (1997). Numerical integration of phytoplankton photosynthesis through time and depth in a water column. New Phytologist, 136(2), 189-209. Available at: doi: 10.1046/j.1469-8137.1997.00736.x.
Examples
path <- file.path(system.file("extdata", package = "pam"))
points <- compare_regression_models_ETR_I(path)
Compare Regression Models for ETR II
Description
Compares multiple regression models for electron transport rate (ETR) data using predefined performance metrics.
Usage
compare_regression_models_ETR_II(data_dir)
Arguments
data_dir |
A character string specifying the directory containing input data files. |
Details
This function compares the performance of the following models:
Eilers-Peeters (1988)
Platt (1980)
Vollenweider (1965)
Walsby (1997)
Models are ranked based on the deviation between observed and predicted values. The results guide users in selecting the most appropriate model for their dataset. Start values for parameters cannot be adjusted within this function. A detailed documentation can be found in the README.
Value
A vector with total points assigned to each regression model based on their performance. Models are ranked as follows:
1st place: 3 points
2nd place: 2 points
3rd place: 1 point
4th place: 0 points
If regression is not possible for a model, no points are awarded for any of the models for the respective file.
References
Eilers, P. H. C., & Peeters, J. C. H. (1988). A model for the relationship between light intensity and the rate of photosynthesis in phytoplankton. Ecological Modelling, 42(3-4), 199-215. Available at: doi: 10.1016/0304-3800(88)90057-9
Platt, T., Gallegos, C. L., & Harrison, W. G. (1980). Photoinhibition of photosynthesis in natural assemblages of marine phytoplankton. Journal of Marine Research, 38(4). Available at: https://elischolar.library.yale.edu/journal_of_marine_research/1525/.
Romoth, K., Nowak, P., Kempke, D., Dietrich, A., Porsche, C., & Schubert, H. (2019). Acclimation limits of Fucus evanescens along the salinity gradient of the southwestern Baltic Sea. Botanica Marina, 62(1), 1-12. Available at: doi: 10.1515/bot-2018-0098.
Vollenweider, R. A. (1965). Calculation models of photosynthesis-depth curves and some implications regarding day rate estimates in primary production measurements. In C. R. Goldman (Ed.), Primary Productivity in Aquatic Environments (pp. 427-457). Mem. Ist. Ital. Idrobiol., 18 Suppl., University of California Press, Berkeley.
Walsby, A. E. (1997). Numerical integration of phytoplankton photosynthesis through time and depth in a water column. New Phytologist, 136(2), 189-209. Available at: doi: 10.1046/j.1469-8137.1997.00736.x.
Examples
path <- file.path(system.file("extdata", package = "pam"))
points <- compare_regression_models_ETR_II(path)
Default start value
Description
Default start value
Usage
eilers_peeters_default_start_value_a
Format
An object of class numeric
of length 1.
Default start value
Description
Default start value
Usage
eilers_peeters_default_start_value_b
Format
An object of class numeric
of length 1.
Default start value
Description
Default start value
Usage
eilers_peeters_default_start_value_c
Format
An object of class numeric
of length 1.
Eilers-Peeters Regression for ETR I
Description
Fits a regression model for ETR I based on Eilers-Peeters (1988), considering photoinhibition.
Usage
eilers_peeters_generate_regression_ETR_I(
data,
a_start_value = eilers_peeters_default_start_value_a,
b_start_value = eilers_peeters_default_start_value_b,
c_start_value = eilers_peeters_default_start_value_c
)
Arguments
data |
A |
a_start_value |
Numeric. Starting value for |
b_start_value |
Numeric. Starting value for |
c_start_value |
Numeric. Starting value for |
Details
A detailed documentation can be found under https://github.com/biotoolbox/pam?tab=readme-ov-file#eilers_peeters_generate_regression_etr_i-and-eilers_peeters_generate_regression_etr_ii.
Value
A list containing:
-
etr_regression_data
: Predicted ETR values. -
sdiff
: Deviation between actual and predicted values. -
a
,b
,c
: Fitted parameters. -
pm
: Maximum ETR (p_m
). -
s
: Initial slope (s
). -
ik
: Transition point from light limitation to light saturation (I_k
). -
im
: PAR at maximum ETR (I_m
). -
w
: Peak sharpness (w
).
References
Eilers, P. H. C., & Peeters, J. C. H. (1988). A model for the relationship between light intensity and the rate of photosynthesis in phytoplankton. Ecological Modelling, 42(3-4), 199-215. Available at: doi: 10.1016/0304-3800(88)90057-9
Examples
path <- file.path(system.file("extdata", package = "pam"), "20240925.csv")
data <- read_dual_pam_data(path)
result <- eilers_peeters_generate_regression_ETR_I(data)
Eilers-Peeters Regression for ETR II
Description
Fits a regression model for ETR II based on Eilers-Peeters (1988), considering photoinhibition.
Usage
eilers_peeters_generate_regression_ETR_II(
data,
a_start_value = eilers_peeters_default_start_value_a,
b_start_value = eilers_peeters_default_start_value_b,
c_start_value = eilers_peeters_default_start_value_c
)
Arguments
data |
A |
a_start_value |
Numeric. Starting value for |
b_start_value |
Numeric. Starting value for |
c_start_value |
Numeric. Starting value for |
Details
A detailed documentation can be found under https://github.com/biotoolbox/pam?tab=readme-ov-file#eilers_peeters_generate_regression_etr_i-and-eilers_peeters_generate_regression_etr_ii.
Value
A list containing:
-
etr_regression_data
: Predicted ETR values. -
sdiff
: Deviation between actual and predicted values. -
a
,b
,c
: Fitted parameters. -
pm
: Maximum ETR (p_m
). -
s
: Initial slope (s
). -
ik
: Transition point from light limitation to light saturation (I_k
). -
im
: PAR at maximum ETR (I_m
). -
w
: Peak sharpness (w
).
References
Eilers, P. H. C., & Peeters, J. C. H. (1988). A model for the relationship between light intensity and the rate of photosynthesis in phytoplankton. Ecological Modelling, 42(3-4), 199-215. Available at: doi: 10.1016/0304-3800(88)90057-9
Examples
path <- file.path(system.file("extdata", package = "pam"), "20240925.csv")
data <- read_dual_pam_data(path)
result <- eilers_peeters_generate_regression_ETR_II(data)
Eilers & Peeters Model Modification
Description
This function enhances the Eilers and Peeters (1988) model by adding parameters not originally included in the model, which were introduced by other models. It also renames parameters to a standardized naming convention used across all models.
Usage
eilers_peeters_modified(model_result)
Arguments
model_result |
A list containing the results of the model, including parameters such as |
Details
A detailed documentation can be found under https://github.com/biotoolbox/pam?tab=readme-ov-file#eilers_peeters_modified
Value
A modified model result as a list with the following elements:
-
etr_type
: ETR Type based on the model result. -
etr_regression_data
: Regression data with ETR predictions based on the fitted model. -
sdiff
: The difference between observed and predicted ETR values. -
a
: The obtained parametera
. -
b
: The obtained parameterb
. -
c
: The obtained parameterc
. -
d
: Not available, set toNA_real_
. -
alpha
: The initial slope of the light curve, transferred unchanged ass
. -
beta
: Not available, set toNA_real_
. -
etrmax_with_photoinhibition
: The maximum electron transport rate with photoinhibition, transferred aspm
. -
etrmax_without_photoinhibition
: Not available, set toNA_real_
. -
ik_with_photoinhibition
: PAR where the transition point from light limitation to light saturation is achieved with photoinhibition, transferred asik
. -
ik_without_photoinhibition
: Not available, set toNA_real_
. -
im_with_photoinhibition
: The PAR at which the maximum electron transport rate is achieved with photoinhibition, transferred asim
. -
w
: The sharpness of the peak, transferred asw
. -
ib
: Not available, set toNA_real_
. -
etrmax_with_without_ratio
: Not available, set toNA_real_
.
Examples
path <- file.path(system.file("extdata", package = "pam"), "20240925.csv")
data <- read_dual_pam_data(path)
result <- eilers_peeters_generate_regression_ETR_II(data)
modified_result <- eilers_peeters_modified(result)
Default start value
Description
Default start value
Usage
platt_default_start_value_alpha
Format
An object of class numeric
of length 1.
Default start value
Description
Default start value
Usage
platt_default_start_value_beta
Format
An object of class numeric
of length 1.
Default start value
Description
Default start value
Usage
platt_default_start_value_ps
Format
An object of class numeric
of length 1.
Platt Regression for ETR I
Description
Fits the Platt (1980) regression model using original naming conventions.
Usage
platt_generate_regression_ETR_I(
data,
alpha_start_value = platt_default_start_value_alpha,
beta_start_value = platt_default_start_value_beta,
ps_start_value = platt_default_start_value_ps
)
Arguments
data |
A |
alpha_start_value |
Numeric. Initial value for |
beta_start_value |
Numeric. Initial value for |
ps_start_value |
Numeric. Initial value for |
Details
A detailed documentation can be found under https://github.com/biotoolbox/pam?tab=readme-ov-file#platt_generate_regression_etr_i-and-platt_generate_regression_etr_ii .
Value
A list containing:
-
etr_regression_data
: Predicted ETR values. -
sdiff
: Deviation between actual and predicted ETR. -
ps
: Maximum electron transport rate without photoinhibition (P_s
). -
alpha
: Initial slope of the light curve (\alpha
). -
beta
: Photoinhibition (\beta
). -
pm
: Maximum electron transport rate with photoinhibition (P_m
). -
ik
: Transition PAR with photoinhibition (I_k
). -
is
: Transition PAR without photoinhibition (I_s
). -
im
: PAR at maximum ETR with photoinhibition (I_m
). -
ib
: (I_b
)
References
Platt, T., Gallegos, C. L., & Harrison, W. G. (1980). Photoinhibition of photosynthesis in natural assemblages of marine phytoplankton. Journal of Marine Research, 38(4). Retrieved from https://elischolar.library.yale.edu/journal_of_marine_research/1525/.
Examples
path <- file.path(system.file("extdata", package = "pam"), "20240925.csv")
data <- read_dual_pam_data(path)
result <- platt_generate_regression_ETR_I(data)
Platt Regression for ETR II
Description
Fits the Platt (1980) regression model using original naming conventions.
Usage
platt_generate_regression_ETR_II(
data,
alpha_start_value = platt_default_start_value_alpha,
beta_start_value = platt_default_start_value_beta,
ps_start_value = platt_default_start_value_ps
)
Arguments
data |
A |
alpha_start_value |
Numeric. Initial value for |
beta_start_value |
Numeric. Initial value for |
ps_start_value |
Numeric. Initial value for |
Details
A detailed documentation can be found under https://github.com/biotoolbox/pam?tab=readme-ov-file#platt_generate_regression_etr_i-and-platt_generate_regression_etr_ii.
Value
A list containing:
-
etr_regression_data
: Predicted ETR values. -
sdiff
: Deviation between actual and predicted ETR. -
ps
: Maximum electron transport rate without photoinhibition (P_s
). -
alpha
: Initial slope of the light curve (\alpha
). -
beta
: Photoinhibition (\beta
). -
pm
: Maximum electron transport rate with photoinhibition (P_m
). -
ik
: Transition PAR with photoinhibition (I_k
). -
is
: Transition PAR without photoinhibition (I_s
). -
im
: PAR at maximum ETR with photoinhibition (I_m
). -
ib
: (I_b
)
References
Platt, T., Gallegos, C. L., & Harrison, W. G. (1980). Photoinhibition of photosynthesis in natural assemblages of marine phytoplankton. Journal of Marine Research, 38(4). Retrieved from https://elischolar.library.yale.edu/journal_of_marine_research/1525/.
Examples
path <- file.path(system.file("extdata", package = "pam"), "20240925.csv")
data <- read_dual_pam_data(path)
result <- platt_generate_regression_ETR_II(data)
Platt Model Modification
Description
This function enhances the Platt (1980) model by adding parameters not originally included in the model, which were introduced by other models. It also renames parameters to a standardized naming convention used across all models.
Usage
platt_modified(model_result)
Arguments
model_result |
A list containing the results of the model, including parameters such as |
Details
A detailed documentation can be found under https://github.com/biotoolbox/pam?tab=readme-ov-file#platt_modified
Value
A modified model result as a list with the following elements:
-
etr_type
: ETR Type based on the model result. -
etr_regression_data
: Regression data with ETR predictions based on the fitted model. -
sdiff
: The difference between observed and predicted ETR values. -
a
: Obtained parametera
, equal toetrmax_without_photoinhibition
. -
b
: Obtained parameterb
, equal toalpha
. -
c
: Obtained parameterc
, equal tobeta
. -
d
: Not available, set toNA_real_
. -
alpha
: The initial slope of the light curve, transferred unchanged asalpha
. -
beta
: The photoinhibition of the light curve, transferred unchanged asbeta
. -
etrmax_with_photoinhibition
: The maximum electron transport rate with photoinhibition, transferred aspm
. -
etrmax_without_photoinhibition
: The maximum electron transport rate without photoinhibition, transferred asps
. -
ik_with_photoinhibition
: PAR where the transition point from light limitation to light saturation is achieved with photoinhibition, transferred asik
. -
ik_without_photoinhibition
: PAR where the transition point from light limitation to light saturation is achieved without photoinhibition, transferred asis
. -
im_with_photoinhibition
: The PAR at which the maximum electron transport rate is achieved with photoinhibition, transferred asim
. -
w
: Not available, set toNA_real_
. -
ib
: Transferred unchanged asib
. -
etrmax_with_without_ratio
: Ratio ofetrmax_with_photoinhibition
toetrmax_without_photoinhibition
, andik_with_photoinhibition
toik_without_photoinhibition
.
Examples
path <- file.path(system.file("extdata", package = "pam"), "20240925.csv")
data <- read_dual_pam_data(path)
result <- platt_generate_regression_ETR_II(data)
modified_result <- platt_modified(result)
Plot Control
Description
This function creates a control plot for the used model based on the provided data and model results.
Usage
plot_control(data, model_result, title, color = "black")
Arguments
data |
A 'data.table' containing the original ETR and yield data for the plot. |
model_result |
A list containing the fitting results of the used model and the calculated paramters (alpha, ik...). |
title |
A character string that specifies the title of the plot. |
color |
A color specification for the regression line in the plot. |
Details
A detailed documentation can be found under https://github.com/biotoolbox/pam?tab=readme-ov-file#plot_control
Value
A plot displaying the original ETR and Yield values and the regression data. A table below the plot shows the calculated data (alpha, ik...)
Examples
path <- file.path(system.file("extdata", package = "pam"), "20240925.csv")
data <- read_dual_pam_data(path)
result <- eilers_peeters_generate_regression_ETR_I(data)
plot_control(data, result, "Control Plot")
Read and Process DualPAM Data
Description
Reads raw CSV files generated by DualPAM software, calculates electron transport rate (ETR) values, and returns a cleaned dataset. Customization may be needed for non-DualPAM devices.
Usage
read_dual_pam_data(
csv_path,
remove_recovery = TRUE,
etr_factor = 0.84,
fraction_photosystem_I = 0.5,
fraction_photosystem_II = 0.5
)
Arguments
csv_path |
File path to the CSV file. |
remove_recovery |
Logical. Removes recovery measurements if |
etr_factor |
Numeric. Factor for ETR calculation. Default is |
fraction_photosystem_I |
Numeric. Relative distribution of absorbed PAR to photosystem I. Default is |
fraction_photosystem_II |
Numeric. Relative distribution of absorbed PAR to photosystem II. Default is |
Details
Calculates ETR using:
\text{ETR} = \text{PAR} \cdot \text{ETR-Factor} \cdot \text{Fraction of Photosystem (I or II)} \cdot \text{Yield (I or II)}
A detailed documentation can be found under https://github.com/biotoolbox/pam?tab=readme-ov-file#read_dual_pam_data
Value
A 'data.table' with processed data and calculated ETR values.
References
Heinz Walz GmbH. (2024). DUAL-PAM-100 DUAL-PAM/F MANUAL, 5th Edition, April 2024, Chapter 7 (pp. 162-172). Heinz Walz GmbH, Effeltrich, Germany. Available at: https://www.walz.com/files/downloads/manuals/dual-pam-100/DualPamEd05.pdf
Examples
path <- file.path(system.file("extdata", package = "pam"), "20240925.csv")
data <- read_dual_pam_data(path)
Default start value
Description
Default start value
Usage
vollenweider_default_start_value_a
Format
An object of class numeric
of length 1.
Default start value
Description
Default start value
Usage
vollenweider_default_start_value_alpha
Format
An object of class numeric
of length 1.
Default start value
Description
Default start value
Usage
vollenweider_default_start_value_n
Format
An object of class numeric
of length 1.
Default start value
Description
Default start value
Usage
vollenweider_default_start_value_pmax
Format
An object of class numeric
of length 1.
Vollenweider Regression for ETR I
Description
Fits the Vollenweider (1965) regression model using original naming conventions from the publication.
Usage
vollenweider_generate_regression_ETR_I(
data,
pmax_start_value = vollenweider_default_start_value_a,
a_start_value = vollenweider_default_start_value_a,
alpha_start_value = vollenweider_default_start_value_alpha,
n_start_value = vollenweider_default_start_value_n
)
Arguments
data |
A |
pmax_start_value |
Numeric. Initial value for |
a_start_value |
Numeric. Initial value for |
alpha_start_value |
Numeric. Initial value for |
n_start_value |
Numeric. Initial value for |
Details
A detailed documentation can be found under https://github.com/biotoolbox/pam?tab=readme-ov-file#vollenweider_generate_regression_etr_i-and-vollenweider_generate_regression_etr_ii.
Value
A list containing:
-
etr_regression_data
: Predicted ETR values. -
sdiff
: Deviation between actual and predicted ETR. -
pmax
: Maximum electron transport rate (p_{max}
). -
a
: Parametera
. -
alpha
: Parameter\alpha
. -
n
: Parametern
. -
popt
: Maximum electron transport rate with photoinhibition (p_{opt}
). -
ik
: Transition point from light limitation to light saturation without photoinhibition (I_k
). -
iik
: Transition point from light limitation to light saturation with photoinhibition (I_k^\prime
). -
pmax_popt_and_ik_iik_ratio
: Ratio ofp_{max}
top_{opt}
andI_k
toI_k^\prime
.
References
Vollenweider, R. A. (1965). Calculation models of photosynthesis-depth curves and some implications regarding day rate estimates in primary production measurements, p. 427-457. In C. R. Goldman [ed.], Primary Productivity in Aquatic Environments. Mem. Ist. Ital. Idrobiol., 18 Suppl., University of California Press, Berkeley.
Examples
path <- file.path(system.file("extdata", package = "pam"), "20240925.csv")
data <- read_dual_pam_data(path)
result <- vollenweider_generate_regression_ETR_I(data)
Vollenweider Regression for ETR II
Description
Fits the Vollenweider (1965) regression model using original naming conventions from the publication.
Usage
vollenweider_generate_regression_ETR_II(
data,
pmax_start_value = vollenweider_default_start_value_pmax,
a_start_value = vollenweider_default_start_value_a,
alpha_start_value = vollenweider_default_start_value_alpha,
n_start_value = vollenweider_default_start_value_n
)
Arguments
data |
A |
pmax_start_value |
Numeric. Initial value for |
a_start_value |
Numeric. Initial value for |
alpha_start_value |
Numeric. Initial value for |
n_start_value |
Numeric. Initial value for |
Details
A detailed documentation can be found under https://github.com/biotoolbox/pam?tab=readme-ov-file#vollenweider_generate_regression_etr_i-and-vollenweider_generate_regression_etr_ii.
Value
A list containing:
-
etr_regression_data
: Predicted ETR values. -
sdiff
: Deviation between actual and predicted ETR. -
pmax
: Maximum electron transport rate (p_{max}
). -
a
: Parametera
. -
alpha
: Parameter\alpha
. -
n
: Parametern
. -
popt
: Maximum electron transport rate with photoinhibition (p_{opt}
). -
ik
: Transition point from light limitation to light saturation without photoinhibition (I_k
). -
iik
: Transition point from light limitation to light saturation with photoinhibition (I_k^\prime
). -
pmax_popt_and_ik_iik_ratio
: Ratio ofp_{max}
top_{opt}
andI_k
toI_k^\prime
.
References
Vollenweider, R. A. (1965). Calculation models of photosynthesis-depth curves and some implications regarding day rate estimates in primary production measurements, p. 427-457. In C. R. Goldman [ed.], Primary Productivity in Aquatic Environments. Mem. Ist. Ital. Idrobiol., 18 Suppl., University of California Press, Berkeley.
Examples
path <- file.path(system.file("extdata", package = "pam"), "20240925.csv")
data <- read_dual_pam_data(path)
result <- vollenweider_generate_regression_ETR_II(data)
Vollenweider Model Modification
Description
This function adds parameters that were not originally included in the Vollenweider (1965) model, but were introduced by other models, and renames the parameters to a standardized one for all models.
Usage
vollenweider_modified(model_result)
Arguments
model_result |
A list containing the results of the model, including parameters such as |
Details
A detailed documentation can be found under https://github.com/biotoolbox/pam?tab=readme-ov-file#vollenweider_modified
Value
A modified model result as a list containing the following elements:
-
etr_type
: ETR Type based on the model result. -
etr_regression_data
: Regression data with ETR predictions based on the fitted model. -
sdiff
: The difference between observed and predicted ETR values. -
a
: Obtained parametera
, here equal toetrmax_without_photoinhibition
. -
b
: Obtained parameterb
, transferred asa
. -
c
: Obtained parameterc
, here transferred asalpha
. -
d
: Obtained parameterd
, here transferred asn
. -
alpha
: The initial slope of the light curve. -
beta
: Not available, here set toNA_real_
. -
etrmax_with_photoinhibition
: The maximum electron transport rate with photoinhibition, transferred aspopt
. -
etrmax_without_photoinhibition
: The maximum electron transport rate without photoinhibition, transferred aspmax
. -
ik_with_photoinhibition
: PAR where the transition point from light limitation to light saturation is achieved taking photoinhibition into account, transferred asiik
. -
ik_without_photoinhibition
: PAR where the transition point from light limitation to light saturation is achieved not taking photoinhibition into account, transferred asik
. -
im_with_photoinhibition
: The PAR at which the maximum electron transport rate is achieved by taking photoinhibition into account, determined using the regression data from the model. -
w
: Not available, here set toNA_real_
. -
ib
: Transferred unchanged asib
. -
etrmax_with_without_ratio
: Ratio ofetrmax_with_photoinhibition
toetrmax_without_photoinhibition
andik_with_photoinhibition
toik_without_photoinhibition
.
Examples
path <- file.path(system.file("extdata", package = "pam"), "20240925.csv")
data <- read_dual_pam_data(path)
result <- vollenweider_generate_regression_ETR_II(data)
modified_result <- vollenweider_modified(result)
Default start value
Description
Default start value
Usage
walsby_default_start_value_alpha
Format
An object of class numeric
of length 1.
Default start value
Description
Default start value
Usage
walsby_default_start_value_beta
Format
An object of class numeric
of length 1.
Default start value
Description
Default start value
Usage
walsby_default_start_value_etr_max
Format
An object of class numeric
of length 1.
Walsby Regression for ETR I
Description
Fits a modified Walsby (1997) regression model without the respiration term, using Romoth (2019) naming conventions.
Calculates ETR_{max}
without accounting for photoinhibition.
Usage
walsby_generate_regression_ETR_I(
data,
etr_max_start_value = walsby_default_start_value_etr_max,
alpha_start_value = walsby_default_start_value_alpha,
beta_start_value = walsby_default_start_value_alpha
)
Arguments
data |
A |
etr_max_start_value |
Numeric. Initial value for |
alpha_start_value |
Numeric. Initial value for |
beta_start_value |
Numeric. Initial value for |
Details
A detailed documentation can be found under https://github.com/biotoolbox/pam?tab=readme-ov-file#walsby_generate_regression_etr_i-and-walsby_generate_regression_etr_ii.
Value
A list containing:
-
etr_regression_data
: Predicted ETR values. -
sdiff
: Deviation between actual and predicted ETR. -
etr_max
: Maximum ETR (ETR_{max}
). -
alpha
: Initial slope (\alpha
). -
beta
: Photoinhibition factor (\beta
).
References
Walsby, A. E. (1997). Numerical integration of phytoplankton photosynthesis through time and depth in a water column. New Phytologist, 136(2), 189-209. Available at: doi: 10.1046/j.1469-8137.1997.00736.x
Romoth, K., Nowak, P., Kempke, D., Dietrich, A., Porsche, C., & Schubert, H. (2019). Acclimation limits of Fucus evanescens along the salinity gradient of the southwestern Baltic Sea. Botanica Marina, 62(1), 1-12. Available at: doi: 10.1515/bot-2018-0098
Examples
path <- file.path(system.file("extdata", package = "pam"), "20240925.csv")
data <- read_dual_pam_data(path)
result <- walsby_generate_regression_ETR_I(data)
Walsby Regression for ETR II
Description
Fits a modified Walsby (1997) regression model without the respiration term, using Romoth (2019) naming conventions.
Calculates ETR_{max}
without accounting for photoinhibition.
Usage
walsby_generate_regression_ETR_II(
data,
etr_max_start_value = walsby_default_start_value_etr_max,
alpha_start_value = walsby_default_start_value_alpha,
beta_start_value = walsby_default_start_value_beta
)
Arguments
data |
A |
etr_max_start_value |
Numeric. Initial value for |
alpha_start_value |
Numeric. Initial value for |
beta_start_value |
Numeric. Initial value for |
Details
A detailed documentation can be found under https://github.com/biotoolbox/pam?tab=readme-ov-file#walsby_generate_regression_etr_i-and-walsby_generate_regression_etr_ii.
Value
A list containing:
-
etr_regression_data
: Predicted ETR values. -
sdiff
: Deviation between actual and predicted ETR. -
etr_max
: Maximum ETR (ETR_{max}
). -
alpha
: Initial slope (\alpha
). -
beta
: Photoinhibition factor (\beta
).
References
Walsby, A. E. (1997). Numerical integration of phytoplankton photosynthesis through time and depth in a water column. New Phytologist, 136(2), 189-209. Available at: doi: 10.1046/j.1469-8137.1997.00736.x
Romoth, K., Nowak, P., Kempke, D., Dietrich, A., Porsche, C., & Schubert, H. (2019). Acclimation limits of Fucus evanescens along the salinity gradient of the southwestern Baltic Sea. Botanica Marina, 62(1), 1-12. Available at: doi: 10.1515/bot-2018-0098
Examples
path <- file.path(system.file("extdata", package = "pam"), "20240925.csv")
data <- read_dual_pam_data(path)
result <- walsby_generate_regression_ETR_II(data)
Walsby Model Modification
Description
Enhances the Walsby (1997) model by adding parameters from other models and standardizing parameter names.
Usage
walsby_modified(model_result)
Arguments
model_result |
A list of model results including |
Details
A detailed documentation can be found under https://github.com/biotoolbox/pam?tab=readme-ov-file#walsby_modified
Value
A list containing:
-
etr_type
: ETR Type based on the model result. -
etr_regression_data
: Regression data with ETR predictions based on the fitted model. -
sdiff
: The difference between observed and predicted ETR values. -
a
: Obtained parametera
, equal toetrmax_without_photoinhibition
. -
b
: Obtained parameterb
, equal toalpha
. -
c
: Obtained parameterc
, equal tobeta
. -
d
: Not available, set toNA_real_
. -
alpha
: The initial slope of the light curve, transferred unchanged asalpha
. -
beta
: The photoinhibition of the light curve, transferred unchanged asbeta
. -
etrmax_with_photoinhibition
: The maximum electron transport rate with photoinhibition. -
etrmax_without_photoinhibition
: The maximum electron transport rate without photoinhibition, transferred asetr_max
. -
ik_with_photoinhibition
: PAR where the transition point from light limitation to light saturation is achieved with photoinhibition. -
ik_without_photoinhibition
: PAR where the transition point from light limitation to light saturation is achieved without photoinhibition. -
im_with_photoinhibition
: PAR at the maximum ETR with photoinhibition. -
w
: Not available, set toNA_real_
. -
ib
: Not available, set toNA_real_
. -
etrmax_with_without_ratio
: Ratio ofetrmax_with_photoinhibition
toetrmax_without_photoinhibition
.
Examples
path <- file.path(system.file("extdata", package = "pam"), "20240925.csv")
data <- read_dual_pam_data(path)
result <- walsby_generate_regression_ETR_II(data)
modified_result <- walsby_modified(result)
Write Model Result CSV
Description
This function exports the raw input data, regression data, and model parameters into separate CSV files for easy access and further analysis.
Usage
write_model_result_csv(dest_dir, name, data, model_result)
Arguments
dest_dir |
A character string specifying the directory where the CSV files will be saved. |
name |
A character string specifying the base name for the output files. |
data |
A data frame containing the raw input data used in the model. |
model_result |
A list containing the model results, including parameter values and regression data. |
Details
This function generates three CSV files:
-
raw_data.csv: Contains the original raw data used in the model.
-
regression_data.csv: Includes the regression data with predicted electron transport rate (ETR) values.
-
model_result.csv: Summarizes the parameter values derived from the model results (excluding regression data), such as
alpha
orbeta
.
The 'name' parameter serves as a prefix for each file, ensuring clarity and organization in the output directory. A detailed documentation can be found under https://github.com/biotoolbox/pam?tab=readme-ov-file#write_model_result_csv
Value
No return value, called for side effects
Examples
path <- file.path(system.file("extdata", package = "pam"), "20240925.csv")
data <- read_dual_pam_data(path)
result <- eilers_peeters_generate_regression_ETR_I(data)
write_model_result_csv(tempdir(), "20240925", data, result)