A simple rate correction function. Please note that the sign of the number must be considered in the correction. Background respiration is normally a negative number, while oxygen flux may or may not be negative.

adjust_rate(x, by)

Arguments

x

numeric. A single value, or any object of class calc_rate or auto_rate. This object contains the rate value that needs to be adjusted.

by

either a numeric, or an object of class calc_rate.bg. This is the value that is used to perform the correction/adjustment.

Value

A list object of class adjust_rate.

Details

To account for background respiration and/or oxygen flux in open respirometry experiments, we have provided a simple function to perform either, or both, corrections. As a separate function we may develop this to support more complex correction methods (e.g. non-linear) in the future.

Examples

# Note that respiration is negative by default (since it represents a # decrease in dissolved oxygen), so both values are negative! # Background respiration correction adjust_rate(-7.44, -0.04) # this is (-7.44) - (-0.04) = -7.40
#> Error in adjust_rate(-7.44, -0.04): could not find function "adjust_rate"
# Oxygen flux correction adjust_rate(-7.44, 0.1) # this is (-7.44) - (0.1) = -7.54
#> Error in adjust_rate(-7.44, 0.1): could not find function "adjust_rate"