calc_rate
calculates the rate of change in oxygen concentration over time
in a data frame. You can perform single or multiple regressions on subsets of
the data frame by calling the from
and to
arguments.
calc_rate(x, from = NULL, to = NULL, by = "time", plot = TRUE)
x | data frame or object of class |
---|---|
from | numeric vector. Defaults to NULL. Defines the lower bound(s) of
the data frame to subset. Subsetting is based on the argument: |
to | numeric vector. Defaults to NULL. Defines the upper bound(s) of the
data frame to subset. Subsetting is based on the argument: |
by | string. |
plot | logical. Defaults to TRUE. Plot the results. |
A list object of class calc_rate
.
There are no units involved in calc_rate
. 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()
.
#> Warning: data set ‘sardine.rd’ not foundcalc_rate(sardine.rd, from = 200, to = 1800) # default subset by 'time'#> Error in calc_rate(sardine.rd, from = 200, to = 1800): could not find function "calc_rate"calc_rate(sardine.rd, 93, 92, by = 'o2') # subset by O2#> Error in calc_rate(sardine.rd, 93, 92, by = "o2"): could not find function "calc_rate"calc_rate(sardine.rd, 1, 1000, by = 'row') # subset by row#> Error in calc_rate(sardine.rd, 1, 1000, by = "row"): could not find function "calc_rate"x <- calc_rate(sardine.rd, .8, .2, by = 'proportion') # subset by proportion#> Error in calc_rate(sardine.rd, 0.8, 0.2, by = "proportion"): could not find function "calc_rate"x#> Error in eval(expr, envir, enclos): object 'x' not found#> Error in summary(x): object 'x' not found#> Error in plot(x): object 'x' not found#> Warning: data set ‘intermittent.rd’ not found#> Error in calc_rate(intermittent.rd, c(200, 2300, 4100), c(1800, 3200, 4600), by = "time"): could not find function "calc_rate"