powered by
Uses within-cluster sum of squares (WSS) to help determine the optimal number of clusters.
plot_elbow(data)
A ggplot object showing the elbow plot.
A numeric matrix or data frame for clustering.
data <- scale(iris[, 1:4]) if (interactive()) { plot_elbow(data) }
Run the code above in your browser using DataLab