Learn R Programming

dendroextras (version 0.2.3)

leaf_colours: Return the leaf colours of a dendrogram

Description

Return the leaf colours of a dendrogram

Usage

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

Arguments

d

the dendrogram

col_to_return

Character scalar - kind of colour attribute to return

Value

named character vector of colours, NA_character_ where missing

Details

The returned colours will be in dendrogram order.

See Also

slice,colour_clusters

Examples

Run this code
# NOT RUN {
d5=colour_clusters(hclust(dist(USArrests), "ave"),5)
leaf_colours(d5)
# }

Run the code above in your browser using DataLab