leaf_Colors: Return the leaf Colors of a dendrogram

View source: R/color_branches.R

leaf_ColorsR Documentation

Return the leaf Colors of a dendrogram

Description

The returned Colors will be in dendrogram order.

Usage

leaf_Colors(d, col_to_return = c("edge", "node", "label"))

Arguments

d

the dendrogram

col_to_return

Character scalar - kind of Color attribute to return

Value

named character vector of Colors, NA_character_ where missing

Author(s)

jefferis

See Also

slice,color_branches

Examples

dend <- USArrests %>%
  dist() %>%
  hclust(method = "ave") %>%
  as.dendrogram()
d5 <- color_branches(dend, 5)
leaf_Colors(d5)

talgalili/dendextend documentation built on Jan. 27, 2024, 7:43 p.m.