spectrum.treeshape {apTreeshape} | R Documentation |
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.
spectrum.treeshape(tree)
tree |
An object of class |
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).
Michael Blum <michael.blum@imag.fr>
Nicolas Bortolussi <nicolas.bortolussi@imag.fr>
Eric Durand <eric.durand@imag.fr>
Olivier Francois <olivier.francois@imag.fr>
## 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]