View source: R/node_conversion_ape.R
as.Node.phylo | R Documentation |
phylo
object from the ape package to a Node
Convert a phylo
object from the ape package to a Node
## S3 method for class 'phylo'
as.Node(
x,
heightName = "plotHeight",
replaceUnderscores = TRUE,
namesNotUnique = FALSE,
...
)
x |
The phylo object to be converted |
heightName |
If the phylo contains edge lengths, then they will be converted to a height and stored in a field named according to this parameter (the default is "height") |
replaceUnderscores |
if TRUE (the default), then underscores in names are replaced with spaces |
namesNotUnique |
if TRUE, then the |
... |
any other parameter to be passed to sub-implementations |
Other ape phylo conversions:
GetPhyloNr()
,
as.phylo.Node()
Other as.Node:
as.Node.data.frame()
,
as.Node.dendrogram()
,
as.Node.list()
,
as.Node.rpart()
,
as.Node()
#which bird familes have the max height?
library(ape)
data(bird.families)
bf <- as.Node(bird.families)
height <- bf$height
t <- Traverse(bf, filterFun = function(x) x$level == 25)
Get(t, "name")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.