Description Usage Arguments Value Examples

View source: R/functions_counts.R

Returns the probability distribution of the storage time required for
the microbial count to reach `log_count`

according to the predictions of
a stochastic `model`

.
Calculations are done using linear interpolation of the individual
model predictions.

1 | ```
distribution_to_logcount(model, log_count)
``` |

`model` |
An instance of |

`log_count` |
The target microbial count. |

An instance of `TimeDistribution`

.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | ```
## We need an instance of StochasticGrowth
my_model <- "modGompertz"
my_times <- seq(0, 30, length = 100)
n_sims <- 3000
library(tibble)
pars <- tribble(
~par, ~mean, ~sd, ~scale,
"logN0", 0, .2, "original",
"mu", 2, .3, "sqrt",
"lambda", 4, .4, "sqrt",
"C", 6, .5, "original"
)
stoc_growth <- predict_stochastic_growth(my_model, my_times, n_sims, pars)
## We can now call the function
time_distrib <- distribution_to_logcount(stoc_growth, 4)
## And plot the results
plot(time_distrib)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.