View source: R/population-simulation.R
population_simulation | R Documentation |
simulate genetic drift in a finite population for one gene with two alleles
population_simulation(ngeneration, population, fitness = c(1, 1, 1))
ngeneration |
integer scalar. Number of generations |
population |
integer vector. How many dominant homozygotes, heterozygotes, and recessive homozygotes do the initial population contain. For example, |
fitness |
numeric vector. The fitness value of AA, Aa and aa. |
numeric vector. The frequency of allele A.
population_simulation(30, c(0, 10, 0))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.