Learn R Programming

clusterWebApp (version 0.1.3)

plot_elbow: Plot Elbow Method for KMeans

Description

Uses within-cluster sum of squares (WSS) to help determine the optimal number of clusters.

Usage

plot_elbow(data)

Value

A ggplot object showing the elbow plot.

Arguments

data

A numeric matrix or data frame for clustering.

Examples

Run this code
data <- scale(iris[, 1:4])
if (interactive()) {
  plot_elbow(data)
}


Run the code above in your browser using DataLab