Calculates rate of oxygen uptake in flowthrough respirometry given a flow-rate and both inflow (upstream of the chamber) and outflow (downstream of the chamber) oxygen concentrations. Can return a single rate value, or multiple and mean values based on continuous data.

calc_rate.ft(
  x = NULL,
  outflow.o2 = NULL,
  inflow.o2 = NULL,
  flowrate = NULL,
  plot = TRUE
)

Arguments

x

data frame or object of class inspect.

outflow.o2

numeric. Defaults to NULL. This specifies the outflow O2 column if a data frame or inspect object is provided. Otherwise, this is a numeric vector for outflow oxygen concentration.

inflow.o2

numeric. Defaults to NULL. This specifies the inflow O2 column if a data frame or inspect object is provided. Otherwise, this is a numeric vector for inflow oxygen concentration.

flowrate

numeric vector. The flow rate. Must be in Litres per unit time (s,m,h), for example L/s. The units are not required to be entered in this function; you will specify them when you perform conversions later in convert_rate.

plot

logical. Defaults to TRUE. Plots the data.

Value

An object of class "calc_rate.ft".

Details

Input can be numeric values or vectors - see examples. In addition, a data.frame or inspect object can be entered. In this case outflow.o2 and inflow.o2 are indices indicting the columns containing these data. Note, an inflow.o2 column must be present in the data.frame, even if this is a single fixed value repeated to the correct length. Note, a numeric time elapsed column can be present, but is not required. In flowthrough data, uptake rate calculations use O2 delta and the flow rate.

There are no units involved in calc_rate.ft. This is a deliberate decision. Units are called in a later function when absolute and/or mass-specific rates of oxygen use are computed in convert_rate() and convert_DO().

Examples

# Single numeric values calc_rate.ft(inflow.o2 = 8.88, outflow.o2 = 8.17, flowrate = 0.000039)
#> Error in calc_rate.ft(inflow.o2 = 8.88, outflow.o2 = 8.17, flowrate = 3.9e-05): could not find function "calc_rate.ft"
# Numeric values and vector data("flowthrough.rd")
#> Warning: data set ‘flowthrough.rd’ not found
calc_rate.ft(inflow.o2 = 8.88, outflow.o2 = flowthrough.rd$o2.out, flowrate = 0.000039)
#> Error in calc_rate.ft(inflow.o2 = 8.88, outflow.o2 = flowthrough.rd$o2.out, flowrate = 3.9e-05): could not find function "calc_rate.ft"
# Vectors data("flowthrough.rd")
#> Warning: data set ‘flowthrough.rd’ not found
calc_rate.ft(inflow.o2 = flowthrough.rd$o2.in, outflow.o2 = flowthrough.rd$o2.out, flowrate = 0.000039)
#> Error in calc_rate.ft(inflow.o2 = flowthrough.rd$o2.in, outflow.o2 = flowthrough.rd$o2.out, flowrate = 3.9e-05): could not find function "calc_rate.ft"
# A data frame data("flowthrough.rd")
#> Warning: data set ‘flowthrough.rd’ not found
calc_rate.ft(flowthrough.rd, outflow.o2 = 2, inflow.o2 = 3, flowrate = 0.00039)
#> Error in calc_rate.ft(flowthrough.rd, outflow.o2 = 2, inflow.o2 = 3, flowrate = 0.00039): could not find function "calc_rate.ft"