R/getBranchTimes.R

Defines functions getBranchTimes

Documented in getBranchTimes

getBranchTimes <-
function(h){
	h<-as(h,"data.frame")
	brtimes<-rep(NA,dim(h)[1])
	for(i in 2:length(brtimes)){
		brtimes[i]<-h$times[as.numeric(as.character(h$ancestors[i]))]		
		}
brtimes
}

Try the surface package in your browser

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

surface documentation built on May 30, 2017, 1:58 a.m.