R/root_find.R

Defines functions rootFind

Documented in rootFind

#' Internal function
#' 
#' @name resolve.monomulti
#' @author Yusuke Matsui & Teppei Shimamura
#' @export


rootFind <- function(edge){
  node <- unique(edge[,1])
  ind <- !node%in%edge[,2]
  if(sum(ind)==1){
    root <- node[ind]
  }else{
    print("there is not root node")
    stop()
  }
  root
}
ymatts/PhyC documentation built on May 4, 2019, 5:30 p.m.