Description Usage Arguments Value
View source: R/run_integration.R
A generic function to integrate a series of ODEs. Designed to have arguments compatible with other run_xxx() functions, rather than optimally designed for ode(). deriv_function must have three arguments (t, pop_vec, param_vec), where t is the time, pop_vec contains the current state of the population in a vector with named elements, and param_vec contains a vector of named parameters. It must return a list with two elements, the first of which is a vector of the derivatives of the population at pop_vec, and the second is an empty vector.
1 2 3 4 5 6 7 8 | run_integration(
deriv_function,
populations,
end.time,
timestep = 1,
debug = FALSE,
...
)
|
deriv_function |
Dunction to calculate derivative |
populations |
Data frame with columns corresponding to function requirements |
end.time |
End time of simulation |
timestep |
(optionally) record the state every timestep - default 1 |
debug |
(optionally) Do you want to print out a limited amount of debugging information about your code? - default FALSE |
... |
Other arguments for deriv_function, mostly parameters |
Data frame containing population history of simulation over time
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.