In what follows, we are going to explore the use of agglomerative clustering with hclust()
using numerical and binary data in two datasets.
In this section, we will examine the case of another dataset. This dataset represents the percentage of acceptance of the themes of federal (national) voting objects in Switzerland in 2001. The first rows of data are in the following table. The rows represent the cantons (the Swiss name for states). The columns (except the first) represent the topic of the voting. The values are the percentage of acceptance of the topic of voting. The data has been retrieved from the Swiss Statistics Office (www.bfs.admin.ch) and are provided in the folder for this chapter (file swiss_votes.dat
).
To load the data, save the file in your working directory or change the working directory (use setwd()
to the path of the file) and type the following line of...