R/terminal.sisters.R

Defines functions terminal.sisters

Documented in terminal.sisters

terminal.sisters <- function(phy){

	x <- sapply(1:length(phy$tip.label), sister, phy = phy)
	len <- sapply(x, length)
	x[len > 1] <- NA
	x <- unlist(x)
	x <- cbind(1:length(phy$tip.label), x)
	x <- x[!is.na(x[, 2]), ]
	x <- cbind(phy$tip.label[x[, 1]], phy$tip.label[x[, 2]])
	unique(t(apply(x, 1, sort)))
}

Try the phyloclim package in your browser

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

phyloclim documentation built on May 25, 2018, 9:04 a.m.