# NOT RUN {
d5=colour_clusters(hclust(dist(USArrests), "ave"),5)
dred=set_leaf_colours(d5,'red','edge')
stopifnot(isTRUE(all(leaf_colours(dred)=='red')))
d52=set_leaf_colours(d5,leaf_colours(d5),'edge')
stopifnot(all.equal(d5,d52))
# }
Run the code above in your browser using DataLab