ape2paleoPhylo: Convert objects of class 'phylo' to class 'paleoPhylo'.

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

Takes the information contained within objects of class phylo and converts using as.paleoPhylo.

Usage

1
ape2paleoPhylo(phy,retainNodeLabels=TRUE,nC=0, getloc=TRUE)

Arguments

phy

An object of class phylo.

retainNodeLabels

If FALSE, then nchar is used to replace node labels with blank names. Defaults to TRUE.

nC

The boundary of number of characters in tip.labels to retain. Defaults to 0, which means that whole tip labels are retained. Setting nC to 3 would mean that any label longer than 3 characters would be retained, whilst anything shorter than that would be stripped back to blank. This is useful because node.labels are also useful in paleobiological phylogenies, yet in objects of class phylo are not always and therefore have less informative names; stripping them to blank makes the plot look tidier, emphasizing interesting bits.

getloc

Should the paleoPhylo object calculate the locations of branches for a non-overlapping phylogeny figure? Defaults to TRUE, but setting as FALSE speeds up conversion for big phylogenies if you don't need the figure.

Details

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.

Value

An object of class 'paleoPhylo', which is a list containing the vectors defined in as.paleoPhylo.

Author(s)

Thomas H.G. Ezard t.ezard@soton.ac.uk

References

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.

See Also

as.paleoPhylo, drawPhylo

Examples

 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)

paleoPhylo documentation built on May 2, 2019, 6:11 p.m.