extractTree | R Documentation |
Extracts a phylo4
tree object from a phylo4d
tree+data object.
extractTree(from)
from |
a |
extractTree
extracts just the phylogeny from a tree+data
object. The phylogeny contains the topology (how the nodes are
linked together), the branch lengths (if any), and any tip and/or
node labels. This may be useful for extracting a tree from a
phylo4d
object, and associating with another phenotypic
dataset, or to convert the tree to another format.
Ben Bolker
phylo4-methods
,
phylo4d-methods
, coerce-methods
for
translation functions.
tree.phylo <- ape::read.tree(text = "((a,b),c);")
tree <- as(tree.phylo, "phylo4")
plot(tree)
tip.data <- data.frame(size = c(1, 2, 3), row.names = c("a", "b", "c"))
(treedata <- phylo4d(tree, tip.data))
plot(treedata)
(tree1 <- extractTree(treedata))
plot(tree1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.