compute.brlen | R Documentation |

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

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

`phy` |
an object of class |

`method` |
the method to be used to compute the branch lengths;
this must be one of the followings: (i) |

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

`...` |
further argument(s) to be passed to |

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`

).

An object of class `phylo`

with branch lengths.

Julien Dutheil dutheil@evolbio.mpg.de and Emmanuel Paradis

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

`read.tree`

for a description of `phylo`

objects,
`di2multi`

, `multi2di`

```
data(bird.orders)
plot(compute.brlen(bird.orders, 1))
plot(compute.brlen(bird.orders, runif, min = 0, max = 5))
layout(matrix(1:4, 2, 2))
plot(compute.brlen(bird.orders, power=1), main=expression(rho==1))
plot(compute.brlen(bird.orders, power=3), main=expression(rho==3))
plot(compute.brlen(bird.orders, power=0.5), main=expression(rho==0.5))
plot(compute.brlen(bird.orders, power=0.1), main=expression(rho==0.1))
layout(1)
```

ape documentation built on March 31, 2023, 6:56 p.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.