Learn R Programming

biogrowth (version 0.2.0)

time_to_logcount: Time to reach a given microbial count

Description

Returns the storage time required for the microbial count to reach log_count according to the predictions of model. Calculations are done using linear interpolation of the model predictions.

Usage

time_to_logcount(model, log_count)

Arguments

model

An instance of IsothermalGrowth or DynamicGrowth.

log_count

The target log microbial count.

Value

The predicted time to reach log_count.

Examples

Run this code
# NOT RUN {
## First of all, we will get an IsothermalGrowth object

my_model <- "modGompertz"
my_pars <- list(logN0 = 2, C = 6, mu = .2, lambda = 25)
my_time <- seq(0, 100, length = 1000)

static_prediction <- predict_isothermal_growth(my_model, my_time, my_pars)
plot(static_prediction)

## And now we calculate the time to reach a microbial count

time_to_logcount(static_prediction, 2.5)

## If log_count is outside the range of the predicted values, NA is returned

time_to_logcount(static_prediction, 20)



# }

Run the code above in your browser using DataLab