- ## assumes that the ordering of tips is unchanged:
- phy$edge[TERMS, 2] <- 1:n
+ ## the tips may not be sorted in increasing order of their
+ ## in the 2nd col of edge, so no need to reorder $tip.label
+ phy$edge[TERMS, 2] <- rank(phy$edge[TERMS, 2])