R/tips.r

#' Names of a phylogenetic tree's tips/leafs.
#' 
#' @param x  A phylo object, as returned from \link{read.tree}..
#' @return A character vector with the leaf names.
#' @export
#' @examples
#'     library(rbiom)
#'     
#'     infile <- system.file("extdata", "newick.tre", package = "rbiom")
#'     tree <- read.tree(infile)
#'     
#'     leafs   <- tips(tree)
#'     subtree <- subtree(tree, head(leafs))
#'
tips <- function (x) {
  x$tip.label
}

Try the rbiom package in your browser

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

rbiom documentation built on Nov. 5, 2021, 9:11 a.m.