R: Get edgePar of dendrogram's leaves

get_leaves_edgePar {dendextend} | R Documentation

## Get edgePar of dendrogram's leaves

### Description

This is helpful to get the attributes of branches of the leaves. For example, after we use color_branches, to get the colors of the labels to match (since getting the colors of branches to match those of the labels can be tricky).

### Usage

    get_leaves_edgePar(dend, simplify = FALSE, ...)

### Arguments

`dend` | a dendrogram object
`simplify` | logical (default is FALSE). If TRUE, then the return vector is after using `unlist` on it.
`...` | not used

### Value

A list (or a vector) with the dendrogram's leaves edgePar attribute

### See Also

get_nodes_attr, assign_values_to_leaves_nodePar, labels_colors get_leaves_nodePar

### Examples

    # define dendrogram object to play with:
    hc <- hclust(dist(USArrests[1:5,]), "ave")
    dend <- as.dendrogram(hc)

    # get_leaves_edgePar(dend) # error :)
    get_leaves_edgePar(dend)
    dend <- color_branches(dend, k = 3)
    get_leaves_edgePar(dend)
    get_leaves_edgePar(dend, TRUE)

    dend <- dend %>% set("branches_lwd", c(2,1,2))
    get_leaves_edgePar(dend)

    plot(dend)

[Package dendextend version 1.8.0 Index]