R/get.groups.R

Defines functions get.groups

Documented in get.groups

get.groups<-function(tree,S,xcut=0){
	if (xcut>0) {groups<-cbind(xcut,S)} else {
	ages<-vector()
	for (i in 1:length(S)){
		index<-which(tree$edge[,2]==i)
		temp<-tree$edge.length[index]
		ages<-c(ages,temp)
	}
	groups<-cbind(ages,S)}
	groups
}

Try the TreePar package in your browser

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

TreePar documentation built on May 1, 2019, 9:20 p.m.