draw.tree: Draw a Coalescent Tree

Description Usage Arguments Details Value Examples

View source: R/coalesceR.R

Description

Draw a coalescent tree.

Usage

1

Arguments

tree

a tree object generated by the sim.tree command

labels

a logical variable, which is TRUE if the user wants labels to be plotted on the tree, and FALSE otherwise

Details

Once the sim.tree command line has been executed, draw.tree can be used to draw the corresponding coalescent tree

Value

Draws a coalescent tree generated by the sim.tree command. If ‘labels = TRUE’, then the labels are drawn on the graph.

Examples

1
2
3
4
5
6
7
8
9
## This is to simulate a coalescent tree using the Hudson's algorithm, with 20 sampled lineages.
## In this example, the current population is 100. It was 1000 before a bottleneck that occurred 
## 50 generations ago

tree <- sim.tree(method = "hudson",sample = 20,current = 100,ancestral = 1000,time = 50)

## This plots (on the screen) the coalescent tree, with labels

draw.tree(tree,labels = TRUE)

coalesceR documentation built on May 2, 2019, 4:42 p.m.