Create instances of models for biological systems.
Made for my own personal use - use at your own peril.
You can install mmbr from R with:
devtools::install_github('atmunr/mmbr')
Simulating the Lotka-Volterra predator prey equations:
library(mmbr)
#>
#> Attaching package: 'mmbr'
#> The following object is masked from 'package:base':
#>
#> solve
params <- new('LotkaVolterraParams',
prey_percapita_growth = 1,
predation_rate = 0.3,
predation_efficiency = 0.6,
predator_percapita_degradation = 0.5
)
init_state <- new('LotkaVolterraState',
prey_population = 2,
predator_population = 1
)
solution <- mmbr::solve(params, init_state, time_range = 30, step_size = 0.1)
mmbr::tsplot(params, solution)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.