Professional Documents
Culture Documents
Elbow
Elbow
r["CRAN"] = "http://cran.us.r-project.org"
options(repos = r)
# Install factoextra
install.packages("factoextra")
library(factoextra)
library(NbClust)
library("ggplot2")
df <- scale(dataset)
fviz_nbclust(df,kmeans,method = "wss")+
geom_vline(xintercept = 4, linetype =2)+
labs(subtitle ="Elbow method")