R/tiporder.R

tiporder <- function(phy, labels = TRUE){
	nn <- length(phy$tip.label) #How many tips on the tree?
	edge <- phy$edge
	nums <- rev(edge[edge[,2] %in% 1:nn, 2])
	if(labels == TRUE) phy$tip.label[nums] else nums
}

Try the spider package in your browser

Any scripts or data that you put into this service are public.

spider documentation built on May 2, 2019, 5:16 p.m.