November 2016
Beginner to intermediate
959 pages
43h 46m
English
The hclust function in the package stats helps us perform hierarchical clustering.
If you have not already downloaded the data files for this chapter, do it now and ensure that the auto-mpg.csv file is in R's working directory.
We will hierarchically cluster the data based on the variables mpg, cylinders, displacement, horsepower, weight, and acceleration.
To perform cluster analysis using hierarchical clustering, follow these steps:
> auto <- read.csv("auto-mpg.csv")rdacb.scale.many <- function (dat, column_nos) { nms <- names(dat) ...Read now
Unlock full access