as.Node.dendrogram: Convert a 'dendrogram' to a data.tree 'Node'

Description Usage Arguments Value See Also Examples

View source: R/node_conversion_dendrogram.R

Description

Convert a dendrogram to a data.tree Node

Usage

1
2
3
4
5
6
7
8
## S3 method for class 'dendrogram'
as.Node(
  x,
  name = "Root",
  heightName = "plotHeight",
  check = c("check", "no-warn", "no-check"),
  ...
)

Arguments

x

The dendrogram

name

The name of the root Node

heightName

The name under which the dendrogram's height is stored

check

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

Value

The root Node of a data.tree

See Also

Other as.Node: as.Node.data.frame(), as.Node.list(), as.Node.phylo(), as.Node.rpart(), as.Node()

Examples

1
2
3
4
5
6
7
8
hc <- hclust(dist(USArrests), "ave")
dend1 <- as.dendrogram(hc)
tree1 <- as.Node(dend1)
tree1$attributesAll
tree1$totalCount
tree1$leafCount
tree1$height
  

Example output

NULL
[1] 99
[1] 50
[1] 10

data.tree documentation built on Aug. 3, 2020, 5:12 p.m.