Description Usage Arguments Value
A simple example of using the single.step function
to determine the time to fixation of a neutral allele for a model. Assumes
that the curr.pop has been suitably initialised. Note that all parameters for
the model, other than max.gens is the same as the model single.step.
This runs the model once, whereas because of the stochastic nature of the model, you would
need to run this model repeatedly to obtain a good mean and variance of the time to fixation.
1 2 3 |
max.gens |
Maximum number of generations before the simulation halts. |
curr.pop |
The current population as a .ppp |
move.table |
Movement table as defined by |
survive.table |
Survival table as defined by |
breed.table |
Breeding table as defined by |
habitat.list |
The list of habitats (probability) surfaces with associated N(m,sd). |
crowd.table |
The crowding table as defined by |
crowding.sigma |
Bandwidth used for density calculation for crowding |
max.dist |
Maximum distance between breeding parents |
trace.output |
TRUE - write out generation details to console |
This function will complete when: (a) The alleles have fixed; (b) The maximum number of generations has been reached; or (c) The population has died out. To allow a simple method for distinguishing each of these cases, the model returns a 6 element numeric vector: <TRUE/FALSE fixed>, <generation>, <Final Population Count>, <Allele Sum> <#Males>,<#Females>. Note that fixation needs to be run many times for a good mean/variance estimate.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.