| founder.event {learnPopGen} | R Documentation |
Simulation of a founder event or population bottleneck
Description
This function simulates genetic drift with a founding event / population bottleneck at time etime.
Usage
founder.event(p0=0.5, Ne=1000, Nf=10, ttime=100, etime=50, show="p", ...)
Arguments
p0 |
Starting frequency for the A allele. |
Ne |
Effective population size at the start of the simulation and after the founding event. |
Nf |
Size of the founding population. |
ttime |
Total time of the simulation. |
etime |
Time for the founding event. Can either be a single generation, or a sequence of generations (e.g., |
show |
Two different options for plotting. |
... |
optional arguments. Presently, the only optional argument in |
Value
The function creates one of two different plots, depending on the value of show.
The function also invisibly returns an object of class "founder.event" which can be printed or plotted using corresponding print and plot methods. (See examples.)
Author(s)
Liam Revell liam.revell@umb.edu
See Also
drift.selection, genetic.drift
Examples
founder.event()
p<-founder.event(show="variation")
print(p)
plot(p,show="p",ltype="l")