November 2016
Beginner to intermediate
959 pages
43h 46m
English
The standard R package stats provides the function for K-means clustering. We also use the cluster package to plot the results of our cluster analysis.
If you have not already downloaded the files for this chapter, do it now and ensure that the auto-mpg.csv file is in your R working directory. Also, ensure that you have installed the cluster package.
To perform cluster analysis using K-means clustering, follow theses steps:
> auto <- read.csv("auto-mpg.csv")rdacb.scale.many <- function (dat, column_nos) { nms <- names(dat) for (col ...Read now
Unlock full access