Description Usage Arguments Value Author(s) Examples
rename tip label of phylogenetic tree
1 | rename_taxa(tree, data, key = 1, value = 2)
|
tree |
tree object, either treedata or phylo |
data |
data frame |
key |
column in data that match tip label (use 1st column by default) |
value |
column in data for rename tip label (use 2nd column by default) |
tree object
Guangchuang Yu
1 2 3 4 | tree <- rtree(3)
d <- data.frame(old = paste0('t', 1:3), new = LETTERS[1:3])
rename_taxa(tree, d)
rename_taxa(tree, d, old, new)
|
Registered S3 method overwritten by 'treeio':
method from
root.phylo ape
treeio v1.14.3 For help: https://yulab-smu.top/treedata-book/
If you use treeio in published research, please cite:
LG Wang, TTY Lam, S Xu, Z Dai, L Zhou, T Feng, P Guo, CW Dunn, BR Jones, T Bradley, H Zhu, Y Guan, Y Jiang, G Yu. treeio: an R package for phylogenetic tree input and output with richly annotated and associated data. Molecular Biology and Evolution 2020, 37(2):599-603. doi: 10.1093/molbev/msz240
Phylogenetic tree with 3 tips and 2 internal nodes.
Tip labels:
A, C, B
Rooted; includes branch lengths.
Phylogenetic tree with 3 tips and 2 internal nodes.
Tip labels:
A, C, B
Rooted; includes branch lengths.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.