Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

as.treedata

as.treedata


Description

convert a tree object to treedata object

Usage

as.treedata(tree, ...)

## S3 method for class 'tbl_tree'
as.treedata(tree, ...)

Arguments

tree

tree object

...

additional parameters

Value

treedata object

Examples

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

tidytree

A Tidy Tool for Phylogenetic Tree Data Manipulation

v0.3.3
Artistic-2.0
Authors
Guangchuang Yu [aut, cre, cph] (<https://orcid.org/0000-0002-6485-8781>), Bradley Jones [ctb], Zebulun Arendsee [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.