coalescent.plot | R Documentation |
Coalescence or coalescent theory is a model for genetic drift within a population in which we envision gene copies merging or "coalescing" into ancestors in the past. This function generates a(n) (optionally animated) visualization of this process of coalescence within a population.
coalescent.plot(n=10, ngen=20, colors=NULL, ...) ## S3 method for class 'coalescent.plot' print(x, ...) ## S3 method for class 'coalescent.plot' plot(x, ...)
n |
number of haploid individuals or gene copies. |
ngen |
number of generations. |
colors |
colors to use for plotting individuals and lines. By default, the function tries to use a contrasting color scheme such that adjacent allele copies are dissimilar (to facilitate visualization of the coalescent process.) |
x |
object of class |
... |
optional arguments. For |
Creates a plot or animation.
Invisibly returns an object of class "coalescent.plot"
containing the alleles (coded numerically) and the parent-offspring relationships from the coalescent simulation. This object can be printed or re-plotted using print
and plot
methods. (See examples.)
Liam Revell liam.revell@umb.edu
drift.selection
, genetic.drift
coalescent.plot() ## Not run: coalescent.plot(n=20,ngen=30,col.order="alternating") object<-coalescent.plot() print(object) plot(object) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.