View source: R/initialise_population.R
initialise_population | R Documentation |
This creates a population of individuals as a 2D matrix of coordinates in a torus and a list of genotypes.
initialise_population(
n_starting_genotypes,
population_size,
box_limit,
pop_structure = "uniform",
mixing = NULL,
sample_spacing = 5,
habitat_labels = NULL,
var_w = 0
)
n_starting_genotypes |
Int >0. Number of initial genotypes to start with. Defaults to 50 |
population_size |
Integer > 1. Calculated by |
box_limit |
Float >1 giving half the circumference of the torus. Ignored
if |
pop_structure |
Character string indicating the initial population
structure to be simulated. Passing "uniform" simulated a panmictic population.
"clusters" simulates clusters of identical individuals that disperse from
distinct mothers via exponential dispersal set by |
mixing |
Float >0. Parameter controlling the degree of spatial
clustering of genotypes. Smaller values indicate more structure populations.
If |
sample_spacing |
Positive integer giving the distance between sampling
points if |
habitat_labels |
Optional vector of habitat labels when
|
var_w |
Additive variance for (log) fitness. Defaults to zero (no selection). |
A list with two elements: geno
, a vector of genotype labels;
coords
, a 2D matrix of coordinate positions.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.