README.md

mmbr

Create instances of models for biological systems.

Made for my own personal use - use at your own peril.

Installation

You can install mmbr from R with:

devtools::install_github('atmunr/mmbr')

Example

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)



atmunr/mmbr documentation built on Oct. 6, 2020, 2:51 a.m.