Description Usage Arguments Value Examples
Translates all labels in the tree based on a list of label mappings.
1 | tree.translate(phylo, map)
|
phylo |
input phylo object |
map |
a list of key-value pairs by which to translate node labels |
phylo, the original tree with all matching labels mapped to their new values.
1 2 3 4 5 | # Translate a tree of NCBI taxa to their common names
taxon.tree <- tree.read('((9606,9598),9593);')
taxon.map <- list('9606'='Human', '9598'='Chimpanzee', '9593'='Gorilla')
readable.tree <- tree.translate(taxon.tree, taxon.map)
print(as.character(readable.tree)) # ((Human,Chimpanzee),Gorilla)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.