map_nodes_ott {datelife} | R Documentation |
Add Open Tree of Life Taxonomy to tree nodes.
Description
Add Open Tree of Life Taxonomy to tree nodes.
Usage
map_nodes_ott(tree)
Arguments
tree |
A tree either as a newick character string or as a |
Value
A phylo
object with "nodelabels".
Examples
## Not run: # This is a flag for package development. You are welcome to run the example.
# Load the Open Tree chronograms database cached in datelife:
utils::data(opentree_chronograms)
# Get the small chronograms (i.e., chronograms with less that ten tips) to generate a pretty plot:
small <- opentree_chronograms$trees[unlist(sapply(opentree_chronograms$trees, ape::Ntip)) < 10]
# Now, map the Open Tree taxonomy to the nodes of the first tree
phy <- map_nodes_ott(tree = small[[1]])
# and plot it:
# plot_phylo_all(phy)
library(ape)
plot(phy)
nodelabels(phy$node.label)
## End(Not run) #end dontrun
[Package datelife version 0.6.8 Index]