Learn R Programming

dendextend (version 0.14.2)

get_branches_attr: get attributes from the dendrogram's root branches

Description

get attributes from the dendrogram's root branches

Usage

get_branches_attr(dend, the_attr, warning = TRUE, ...)

Arguments

dend
dendrogram object
the_attr
the attribute to get from the branches (for example "height")
warning
default is TRUE. Should a warning be printed when the function is used on an object which is NOT a dendrogram.
...
passed on to attr

Value

  • The attributes of the branches (often two) of the dendrogram's root

See Also

attr

Examples

Run this code
hc <- hclust(dist(USArrests[2:9,]), "com")
dend <- as.dendrogram(hc)

get_branches_attr(dend, "height") # 0.00000 71.96247
# plot(dend)
str(dend, 2)

Run the code above in your browser using DataLab