guess_when | R Documentation |
Estimates the time at which O2 will reach a defined level assuming a linear change in O2 over time.
guess_when(past_o2, past_time, goal_o2, plot = TRUE)
past_o2 |
a numeric vector of at least two oxygen measurements previously during the trial. |
past_time |
a vector of timepoints corresponding to when |
goal_o2 |
a numeric vector or single value describing the O2 level of interest. |
plot |
logical. Do you want to see a plot to visualize this prediction? |
A prediction of the time when O2 will reach goal_o2
. If past_time
is numeric, then a numeric value(s) will be returned. If POSIX, then POSIX will be returned.
Viewing the plot can be valuable if the O2 consumption or production is not linear.
Matthew A. Birk, matthewabirk@gmail.com
predict_pH
, predict_nh3
guess_when(past_o2 = rnorm(n = 10, mean = 100:91), past_time = 1:10, goal_o2 = 75, plot = FALSE)
guess_when(past_o2 = rnorm(n = 10, mean = 100:91, sd = 5), past_time = 1:10, goal_o2 = 75)
# Viewing the plot can be helpful to see how trustworthy the prediction is
# when signal:noise is low.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.