dendrogram to a data.tree NodeR/node_conversion_dendrogram.R
as.Node.dendrogram.RdConvert a dendrogram to a data.tree Node
The dendrogram
The name of the root Node
The name under which the dendrogram's height is stored
Either
"check": if the name conformance should be checked and warnings should be printed in case of non-conformance (the default)
"no-warn": if the name conformance should be checked, but no warnings should be printed in case of non-conformance (if you expect non-conformance)
"no-check" or FALSE: if the name conformance should not be checked; use this if performance is critical. However, in case of non-conformance, expect cryptic follow-up errors
Additional parameters
The root Node of a data.tree
Other as.Node:
as.Node.data.frame(),
as.Node.list(),
as.Node.phylo(),
as.Node.rpart(),
as.Node()
hc <- hclust(dist(USArrests), "ave")
dend1 <- as.dendrogram(hc)
tree1 <- as.Node(dend1)
tree1$attributesAll
#> [1] "members" "midpoint" "plotHeight" "leaf" "value"
tree1$totalCount
#> [1] 99
tree1$leafCount
#> [1] 50
tree1$height
#> [1] 10