Description Usage Arguments Details Value Author(s) References See Also Examples
Takes the information contained within objects of class phylo
and converts using as.paleoPhylo
.
1 | ape2paleoPhylo(phy,retainNodeLabels=TRUE,nC=0, getloc=TRUE)
|
phy |
An object of class phylo. |
retainNodeLabels |
If FALSE, then |
nC |
The boundary of number of characters in tip.labels to retain. Defaults to 0, which means that whole tip labels are retained. Setting |
getloc |
Should the |
The principal current use is to enable plotting with drawPhylo
and its array of axis formats.
If tip.labels are included, then they are exported as labels
in paleoPhylo
. Non-tip labels are assumed to be the node label. Future revisions will provide the option to change this.
Objects of class phylo
are defined using edge matrices (see read.tree
); paleoPhylo
objects require a unique root that gave rise to the focal clade. The unique root is assumed to have geologically infinitessimal duration, such that it is not visible on plots. Future releases will incorporate analytical tools; at this stage additional functionality will be introduced to adapt this.
An object of class 'paleoPhylo', which is a list containing the vectors defined in as.paleoPhylo
.
Thomas H.G. Ezard t.ezard@soton.ac.uk
Ezard, T.H.G. & Purvis, A. (2009). paleoPhylo: free software to draw paleobiological phylogenies. Paleobiology 35, 460-464. doi: 10.1666/0094-8373-35.3.460.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | op <- par(no.readonly=TRUE)
##load bird order data from ape
data(bird.orders)
bird.orders
brdOrd <- ape2paleoPhylo(bird.orders)
brdOrd
##but that includes uninformative node labels, how do I change that?
brdOrd <- ape2paleoPhylo(bird.orders, nC=3)
brdOrd
##generate a plot using drawPhylo
data(gradstein04)
drawPhylo(brdOrd, tmScl=gradstein04, whatTime=c("period","epoch","stage"),
addTimeLine="c", l2r=TRUE, nmLim=1)
##that's no use though, since all the names are too long for each box
##how do I shorten those names to, say, three letters long?
##generates a new column in gradstein04 containing the shorthand
gradstein04$shStg <- substr(gradstein04$stage,1,3)
##do others similarly by hand...
gradstein04$epch <- gradstein04$epoch
gradstein04$epch[1:3] <- c("R", "Hol.", "Pt.")
gradstein04$prd <- as.character(gradstein04$period)
gradstein04$prd[1:3] <- rep("Q", 3)
str(gradstein04)
drawPhylo(brdOrd, tmScl=gradstein04, whatTime=c("prd","epch","shStg"),
addTimeLine="c", l2r=TRUE, nmLim=1, cexTime=0.7, cexText=1)
par(op)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.