widths | R Documentation |
Find the number of nodes at each depth in the tree
widths(tree)
tree |
a tree of class |
A vector of widths, where entry i is the number of nodes at depth i. There is a single node at depth 0 (the root) which is not included in the vector, for simplicity.
Caroline Colijn c.colijn@imperial.ac.uk
Michelle Kendall michelle.louise.kendall@gmail.com
## Find the node widths in a random tree with 10 tips: tree <- rtree(10) tree$edge.length <- rep(1,18) # to make it easier to see the width and depths in the plot plot(tree) widths(tree)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.