[Recommended] Three Colunmsds Mtcars
data(mtcars) # load the dateset
# use only three colunms
ds <- mtcars[, c(“mpg”, “cyl”, “wt”)]
# convert the cyl into factor (labels)
ds$cyl <- as.factor(ds$cyl)
Use K-means to cluster the dataset “ds” we have used in previous lesson, then plot the points, the clusters, and the centers together with different colors. First, use the “elbow” method to find the number of clusters, K. Finally, summarize the results. Put your code, plots, and summary in a word file, upload this word file to SOUL.