Phylobasics
Table of Contents

Simple ape phylogeny

#######################################################
# R code: Phylogeny versus cladogram
#######################################################
library(ape)

# Tree specification
newick_string = "((((human:6,chimp:6):1,gorilla:7):6,orang:13):5,gibbon:18);"
tr = read.tree(file="",text=newick_string)
plot(ladderize(tr, right=FALSE), cex=1.5); axisPhylo(cex=2); title("Dated phylogeny of humans and closest relatives"); mtext("millions of years ago", side=1, line=3)

# Remove branch lengths
tr2 = tr
tr2$edge.length = NULL
plot(ladderize(tr2, right=FALSE), cex=1.5); title("Cladogram of humans and closest relatives\n(branch lengths irrelevant)"); mtext("x-axis not meaningful", side=1, line=3)
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License