# function to compute total within-cluster sum of squares. fviz_nbclust(contest.scaled, kmeans, method = "wss", k.max = 50,verbose=TRUE,print.summary=TRUE) + theme_minimal() + ylab("Total Within Sum of Squares")+ xlab("Number of clusters (k)")+ ggtitle("Determining optimal number of clusters using the Elbow Method")+theme(plot.title=element_text(hjust=0.5))