R/Find-tips.R

#' Find tips from all lineage of complete tree.
#' @param  allLin all lineage of tree
#' @return tips lineage
#' @export

Find.tips <- function(allLin){


  the.root <- Find.root(allLin)

  if(testit::has_warning(Find.root(allLin))==T){

    allLin.2 <- allLin

  }else{

    allLin.2 <- allLin[allLin!=the.root]

  }


  the.allMother <- allLin.2 %>% substr(1,nchar(.)-1) %>% unique()

  the.tips <- dplyr::setdiff(allLin.2,the.allMother)

  return(the.tips)

}
helloicyvodka/ggVITA documentation built on May 28, 2019, 8:55 p.m.