Description Usage Arguments Details Examples
finite_pop
simulates Mendelian populations over many generations. Specify initial allele
frequencies, population size, and the number of generations. The simulation produces each generation of
the population by randomly selecting 2N (ND) alleles for N (ND) individuals from a gamete pool based on
allele frequencies.
1 | finite_pop(p1g2, p2g2, alleles, ND, generations)
|
p1g2 |
Allele 1 frequency |
p2g2 |
Allele 2 frequency |
alleles |
allele types (use 1 and 2) |
ND |
Population size |
generations |
number of generations |
finite_pop
returns three plots:
1) Allele 1 frequency versus number of generations, 2) Observed and expected heterozygosity versus number
of generations, and 3) Wright's F with a loess regression best fit line.
It also returns Fisher's exact tests (fisher.test) comparing the observed genotype counts to the expected
and initial values.
1 | finite_pop(0.3,0.7,c(1,2),100,100)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.