plot_elbow: Plot Elbow Method for KMeans

View source: R/plot_elbow.R

plot_elbowR Documentation

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)

Arguments

data

A numeric matrix or data frame for clustering.

Value

A ggplot object showing the elbow plot.

Examples

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



clusterWebApp documentation built on Aug. 8, 2025, 6:09 p.m.