Find the number of nodes at each depth in the tree
widths(tree)
a tree of class phylo
or phylo4
. The tree should be binary and rooted; if not it will be coerced into a binary rooted tree using multi2di, if possible.
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.