Return the tip labels of a tree as a character vector, whether the
tree is already an ape::phylo object in memory or lives in a
Newick or Nexus file on disk. Convenience wrapper around
tree$tip.label that also handles file input and multi-tree files
(returns the tips of the first tree).
Arguments
- tree
An
ape::phyloobject, or a length-1 character vector giving the path to a Newick (.nwk,.tre,.tree,.newick) or Nexus (.nex,.nexus) file. Format is auto-detected.
See also
pr_normalize_names() for cleaning tip labels before
joining against a data frame.
Other name utilities:
pr_normalize_names()