ape (version 1.7)

compute.brlen: Branch lengths Computation

Description

Compute branch lengths.

Usage

compute.brlen(phy, method = "Grafen", power = 1)

Arguments

phy
An object of class phylo representing the tree.
method
The method to use to compute lengths. Only Grafen's 1989 method is implemented for now.
power
The power at which heights must be raised (see below).

Value

  • An object of class phylo with branch lengths.

Details

Grafen's (1989) computation of branch lengths: Each node is given a 'height', namely the number of leaves of the subtree minus one, 0 for leaves. Each height is scaled so that root height is 1, and then raised at power 'rho' (> 0). Branch lengths are then computed as the difference between height of lower node and height of upper node.

Zero-length branches are not treated as multichotomies, and thus may need to be collapsed (see di2multi).

References

Grafen, A. (1989) The phylogenetic regression. Philosophical Transactions of the Royal society of London. Series B. Biological Sciences, 326, 119--157.

See Also

read.tree for a description of phylo objects, di2multi, multi2di

Examples

Run this code
data(bird.orders)
split.screen(c(2,2))
screen(1)
plot(compute.brlen(bird.orders, power=1), main=expression(rho==1))
screen(2)
plot(compute.brlen(bird.orders, power=3), main=expression(rho==3))
screen(3)
plot(compute.brlen(bird.orders, power=0.5), main=expression(rho==0.5))
screen(4)
plot(compute.brlen(bird.orders, power=0.1), main=expression(rho==0.1))
close.screen(all=TRUE)

Run the code above in your browser using DataCamp Workspace