as.treedata | R Documentation |
convert a tree object to treedata object
as.treedata(tree, ...)
## S3 method for class 'tbl_tree'
as.treedata(tree, ...)
tree |
tree object |
... |
additional parameters |
treedata object
library(ape)
set.seed(2017)
tree <- rtree(4)
d <- tibble(label = paste0('t', 1:4),
trait = rnorm(4))
x <- as_tibble(tree)
full_join(x, d, by = 'label') %>% as.treedata
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.