% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/visualization.R
\name{plot_elbow}
\alias{plot_elbow}
\title{Create Elbow Plot for K-Means}
\usage{
plot_elbow(wss_data, add_line = FALSE, suggested_k = NULL)
}
\arguments{
\item{wss_data}{A tibble with columns k and tot_withinss (from calc_wss)}

\item{add_line}{Add vertical line at suggested optimal k? (default: FALSE)}

\item{suggested_k}{If add_line=TRUE, which k to highlight}
}
\value{
A \code{\link[ggplot2]{ggplot}} object.
}
\description{
Plot total within-cluster sum of squares vs number of clusters
}
\examples{
\donttest{
wss <- data.frame(k = 2:6, tot_withinss = c(150, 90, 60, 50, 45))
plot_elbow(wss)
}
}
