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. "p" shows the frequency of A through time; "surface" plots the mean fitness as a function of p; "deltap" shows the change in p as a function of p; "cobweb" creates a cobweb plot showing p(t) by p(t+1). The default is show="p".
pause
Pause between generations. pause=0.01 (for instance) might smooth animation.
...
Optional arguments, including: add, a logical value indicating whether or not to add to the current plot (applies only to show="p"); color, change the color of the plotted line (works nicely with add, for obvious reasons); and equil, a logical value indicating whether or not to show the equilibrium value of p using vertical (or horizontal) lines on the graph (defaults to FALSE).
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.)