# Note that oxygen uptake rates are negative in respR
# since they represent a decrease in dissolved oxygen
# and negative slope. Typically both specimen rate and
# background rate values are negative.
# ----------------------------------------------------
# Simple background respiration correction to a single
# rate.
# Note, 'x' and 'by' should both be rates calculated as
# the delta oxygen value, the difference between inflow
# and outflow oxygen, multiplied by the flowrate.
# This is (-0.98) - (-0.04) = -0.94
adjust_rate.ft(x = -0.98, by = -0.04)
# ----------------------------------------------------
# Mean background adjustment to a single rate.
adjust_rate.ft(x = -0.98, by = c(-0.04, -0.05, -0.06))
# ----------------------------------------------------
# Mean background adjustment to multiple rates.
out <- adjust_rate.ft(x = c(-0.98, -0.87, -0.91),
by = c(-0.04, -0.05, -0.06))
summary(out)
# ----------------------------------------------------
# Adjustment using calc_rate.ft objects
# Specimen rate
sp_rate <- flowthrough_mult.rd %>%
inspect.ft(time = 1, out.oxy = 2, in.oxy = 6) %>%
calc_rate.ft(from = 30, flowrate = 0.1)
# Background rate
bg_rate <- flowthrough_mult.rd %>%
inspect.ft(time = 1, out.oxy = 5, in.oxy = 9) %>%
calc_rate.ft(flowrate = 0.1)
# Perform adjustment
adj_rate <- adjust_rate.ft(sp_rate, by = bg_rate)
print(adj_rate)
summary(adj_rate)
# ----------------------------------------------------
Run the code above in your browser using DataLab