R/tipToRootDist.R

Defines functions tipToRootDist

Documented in tipToRootDist

tipToRootDist <- function(phy){
	phyBR <- branches.per.tip(phy)
	phyBL <- lapply(phyBR, function(x) phy$edge.length[x])
	phyBS <- sapply(phyBL, sum)
	phyBS
}

Try the spiderDev package in your browser

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

spiderDev documentation built on May 2, 2019, 5:23 p.m.