plot_silhouette {clusterWebApp} | R Documentation |
Plot Silhouette Diagram
Description
Plots the silhouette diagram for a given clustering result.
Usage
plot_silhouette(sil)
Arguments
sil |
A silhouette object as returned by |
Value
A silhouette plot if input is not NULL, otherwise a placeholder text.
Examples
data <- scale(iris[, 1:4])
cl <- kmeans(data, 3)$cluster
sil <- cluster::silhouette(cl, dist(data))
if (interactive()) {
plot_silhouette(sil)
}
[Package clusterWebApp version 0.1.3 Index]