# NOT RUN {
library (cluster)
data (votes.repub)
a <- agnes (votes.repub, method="ward")
b <- kgs (a, a$diss, maxclust=20)
plot (names (b), b, xlab="# clusters", ylab="penalty")
# }
Run the code above in your browser using DataCamp Workspace