clusters <- 5 load("wine.Rdata") pdf("graphics/rplot-cluster.pdf") wine.cl = kmeans(wine[,2:3], clusters) plot(wine[,2:3], col=wine.cl$cluster) points(wine.cl$centers, pch=19, cex=1.5, col=1:clusters) dev.off()