Description Usage Arguments Value Author(s) See Also Examples
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.
1 | 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>
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]
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.