Butterfly: Example of individual based model using R6: the Butterfly...

Description Usage Format Examples

Description

This example is a simple population genetic model programmed using individual based simulation. The inspiration is the example of the Peppered moth textbook story (https://en.wikipedia.org/wiki/Peppered_moth_evolution). Check examples for usage.

Usage

1
2
3
4
5
6
7

Format

An object of class R6ClassGenerator of length 24.

Examples

1
2
3
4
5
6
7
8
simu <- Simulation$new(years = 200, N = 500, mutation_rate = 1e-2, period = 50)  ## intialisation
simu$output
simu$run() ## run simulations
simu$plot() ## plot simulations
## Not run: 
simu$profile() ## profile the code

## End(Not run)

courtiol/BeginR documentation built on May 12, 2019, 7:41 a.m.