spectrum.treeshape: Compute the spectrum of a tree

Description Usage Arguments Value Author(s) See Also Examples

Description

This function returns a sequence containing the number of subtrees of size n, n-1, ..., 3, 2 where n is the size of the tree. The 'k'th element of the sequence is the number of subtrees of size n-k+1 in the tree, where n is the number of tips of the tree.

Usage

1

Arguments

tree

An object of class "treeshape".

Value

A sequence of size n-1 (where n is the number of tips of the tree) containing the number of subtrees of each size. spectrum.treeshape(tree)[1] is the number of subtrees with n tips (equal to 1). spectrum.treeshape(tree)[n-1] is the number of cherries of the tree (subtrees with 2 tips).

Author(s)

Michael Blum <michael.blum@imag.fr>
Nicolas Bortolussi <nicolas.bortolussi@imag.fr>
Eric Durand <eric.durand@imag.fr>
Olivier Francois <olivier.francois@imag.fr>

See Also

smaller.clade.spectrum

Examples

1
2
3
4
5
6
7
8
## A random Yule tree with 30 tips
tr<-rtreeshape(n=1,tip.number=30,model="yule")
tr<-tr[[1]]
spectre=spectrum.treeshape(tr)
spectre
  
## Number of cherries of the tree : nrow(tr$merge)==29
spectre[29]

bcm-uga/apTreeshape documentation built on Sept. 26, 2019, 4:56 p.m.