selection {learnPopGen} | R Documentation |
Numerical analysis of biallelic locus frequency independent selection
Description
This function performs numerical analysis of a simple biallelic selection model.
Usage
selection(p0=0.01, w=c(1.0,0.9,0.8), time=100, show="p", pause=0, ...)
Arguments
p0 |
Starting frequency for the A allele. |
w |
Fitnesses for the three genotypes in the following order: AA, Aa, aa. |
time |
Number of generations to run the analysis. |
show |
Various options for plotting. |
pause |
Pause between generations. |
... |
Optional arguments, including: |
Value
The function creates one of several possible plots, depending on the value of show
.
The cobweb plot shows p(t+1) as a function of p(t), with stairsteps giving the changes across generations given the initial value of p (p0
) and total time (time
) that are specified by the user.
The function invisibly returns an object of class "selection"
which can be printed or re-plotted using associated print
and plot
methods. (See examples.)
Author(s)
Liam Revell liam.revell@umb.edu
See Also
drift.selection
, freqdep
, msd
, mutation.selection
Examples
selection(w=c(1.0,0.8,0.8),time=500)
selection(w=c(1.0,1.0,0.0),show="surface")
object<-selection(w=c(0.8,1.1,0.7))
print(object)
plot(object,show="cobweb")