| 1 |
% Generated by roxygen2: do not edit by hand |
| 2 |
% Please edit documentation in R/labels_colors.R |
| 3 |
\name{color_unique_labels} |
| 4 |
\alias{color_unique_labels} |
| 5 |
\title{Color unique labels in a dendrogram} |
| 6 |
\usage{ |
| 7 |
color_unique_labels(dend, ...) |
| 8 |
} |
| 9 |
\arguments{ |
| 10 |
\item{dend}{a dend object} |
| 11 |
|
| 12 |
\item{...}{NOT USED} |
| 13 |
} |
| 14 |
\value{ |
| 15 |
A dendrogram after the colors of its labels have been updated (a different color for each unique label). |
| 16 |
} |
| 17 |
\description{ |
| 18 |
Color unique labels in a dendrogram |
| 19 |
} |
| 20 |
\examples{ |
| 21 |
|
| 22 |
x <- c(2011, 2011, 2012, 2012, 2015, 2015, 2015) |
| 23 |
names(x) <- x |
| 24 |
dend <- as.dendrogram(hclust(dist(x))) |
| 25 |
|
| 26 |
par(mfrow = c(1, 2)) |
| 27 |
plot(dend) |
| 28 |
dend2 <- color_unique_labels(dend) |
| 29 |
plot(dend2) |
| 30 |
} |