Learn R Programming

MicrobialGrowth (version 1.0.0)

getFormula: Formula getter

Description

Returns the formula associated with the specified model.

Usage

getFormula(model)

Value

the function corresponding to the formula of the model.

Arguments

model

the model name.

Examples

Run this code
f <- getFormula("gompertz")
# We need to set the parameters (N0, ..., lambda)
f2 <- f(0.1, 2, 0.2, 5)
# And we can then use the function "f(x)" with x the time
f2(4)
## [1] 0.1150952

# The same, more direct
F <- getFormula("gompertz")(0.1, 2, 0.2, 5)
F(4)
## [1] 0.1150952

Run the code above in your browser using DataLab