adj_by_temp: Predict biological parameters at a new temperature

View source: R/adj_by_temp.R

adj_by_tempR Documentation

Predict biological parameters at a new temperature

Description

Predicts the values of any inputted biological parameter (e.g. MO2, Pcrit) at a new temperature based on empirical measurements at a range of temperatures. Data can be fit to a temperature-dependence curve using either Q10 or calc_E. By default, the predicted values are also plotted alongside the inputted data to allow the user to assess the quality of the fit.

Usage

adj_by_temp(
  meas_temp,
  meas_x,
  temp_new,
  method = "Q10",
  Q10,
  E,
  show_coef = FALSE,
  plot_fit = TRUE
)

Arguments

meas_temp

a vector of temperature values (°C) corresponding to meas_x.

meas_x

a vector of biological values (e.g. MO2, Pcrit) corresponding to meas_temp. These are typically empirically derived.

temp_new

a vector of temperature values (°C) at which new values of "x" should be predicted.

method

which method for calculcating temperature-dependency should be used? Options are "Q10" (default) and "E". If either Q10 or E parameters have values, then this parameter is ignored.

Q10

(optional). A Q10 value to be used for predicting new values of "x". If method = "Q10" and Q10 is not defined here, then an appropriate Q10 value will be calculated internally using Q10.

E

(optional). An E value to be used for predicting new values of "x". If method = "E" and E is not defined here, then an appropriate E value will be calculated internally using calc_E.

show_coef

logical. Should the temperature-dependency coefficient (i.e. the numeric value of either Q10 or E) be returned alongside the new values of "x"? Default is FALSE.

plot_fit

logical. Should a plot be displayed showing how well the new "x" values fit with the inputted data? Default is TRUE.

Value

If show_coef = FALSE (default), then a numeric vector of new values of "x" are returned. If show_coef = TRUE, then a list of new values and the temperature-dependency coefficient are returned.

Author(s)

Matthew A. Birk, matthewabirk@gmail.com

See Also

Q10, calc_E

Examples

# I measured Pcrit at four different temperatures. What is the Pcrit at an
# intermediate temperature?
adj_by_temp(meas_temp = c(5, 10, 15, 20), meas_x = c(3.1, 6.3, 7, 8.4), temp_new = 18)

# If requested values exceed the inputted temperature range, a message is reported.
# Biology cannot go on forever like the math can.
adj_by_temp(meas_temp = c(10, 15, 20, 25), meas_x = c(4.8, 6, 12.3, 13.6), temp_new = 0:30)


respirometry documentation built on July 9, 2023, 5:30 p.m.