-## drop.tip.R (2010-02-11)
+## drop.tip.R (2010-07-21)
## Remove Tips in a Phylogenetic Tree
if (wbl) phy$edge.length <- phy$edge.length[keep]
TIPS <- phy$edge[, 2] <= Ntip
tip <- phy$edge[TIPS, 2]
- phy$tip.label <- phy$tip.label[tip]
+ phy$tip.label <- phy$tip.label[sort(tip)] # <- added sort to avoid shuffling of tip labels (2010-07-21)
## keep the ordering so no need to reorder tip.label:
phy$edge[TIPS, 2] <- order(tip)
if (!is.null(phy$node.label))