Description Usage Arguments Value Examples
View source: R/treeplyr_functions.R
This function generates an object of class treedata
that ensures that the ordering of tip labels
and data remain intact. The object can be manipulated using dplyr
functions.
1 | make.treedata(tree, data, name_column = "detect", as.is = FALSE)
|
tree |
An object of class 'phylo' |
data |
A data frame or matrix |
name_column |
An optional argument that specifies the column of |
as.is |
Whether convert to factors. When FALSE (default), convert character vectors to factors. |
An object of class "treedata
". The tree is pruned of tips not represented in the data,
and the data is filtered for taxa not in the tree. The data is returned as a data frame tble that is
compatible with dplyr
functions.
1 2 | data(anolis)
td <- make.treedata(anolis$phy, anolis$dat)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.