as.treedata: as.treedata

View source: R/AllGenerics.R

as.treedataR Documentation

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 documentation built on May 29, 2024, 5:21 a.m.