Description Usage Arguments Value Author(s) See Also Examples
Simulates drift and natural selection at a single biallelic locus within one or various populations.
1 | drift.selection(p0=0.5, Ne=100, w=c(1,1,1), ngen=400, nrep=10, colors=NULL, ...)
|
p0 |
starting frequency for the A allele. |
Ne |
effective population size. |
w |
fitnesses of the three genotypes: AA, Aa, and aa. |
nrep |
number of replicate simulations. |
ngen |
total time, in number of generations, for the simulation. |
colors |
colors to use for plotting. |
... |
optional arguments. Presently the only arguments are |
The function creates a plot and returns an object of class "drift.selelction"
consisting of list containing the allele frequency through time for each simulation. This object can be printed or plotted using corresponding methods. (See examples.)
Liam Revell liam.revell@umb.edu
1 2 3 4 | drift.selection()
p<-drift.selection(p0=0.01,Ne=100,w=c(1,0.9,0.8),ngen=200,nrep=5)
print(p)
plot(p)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.