compute.brlen: Branch Lengths Computation

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

View source: R/PGLS.R

Description

This function computes branch lengths of a tree using different methods.

Usage

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

Arguments

phy

an object of class phylo representing the tree.

method

the method to be used to compute the branch lengths; this must be one of the followings: (i) "Grafen" (the default), (ii) a numeric vector, or (iii) a function.

power

The power at which heights must be raised (see below).

...

further argument(s) to be passed to method if it is a function.

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.

If one or several numeric values are provided as method, they are recycled if necessary. If a function is given instead, further arguments are given in place of ... (they must be named, see examples).

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

Value

An object of class phylo with branch lengths.

Author(s)

Julien Dutheil [email protected] and Emmanuel Paradis

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

1
2
3
4
5
6
7
8
9

Example output



ape documentation built on Sept. 24, 2018, 9:03 a.m.