## Creates a random tree of class phylo4 and plots it with nodes labelled by ID
tree <- rtree4(50)
tree <- idNodeLabel(tree)
plot(tree,show.tip.label=FALSE,show.node.label=TRUE)
## Finds the length of the ladder staring from the root
rootLaddDist(tree)
Run the code above in your browser using DataLab