[R] How to show clustering results?
pengyu.ut at gmail.com
Sat Oct 3 18:29:21 CEST 2009
I know the following code can show the dendrogram. But I also want to
plot the points on a figure and have circles (or boxes) around the
points in a cluster (see
http://www.autonlab.org/tutorials/kmeans11.pdf for some examples). I
am wondering how to do so in R.
x1 = c(0,0)
x2 = c(1,0)
x3 = c(.2,2)
x4 = c(.8,2)
plot(hclust(dist(rbind(x1,x2,x3,x4)),method = 'complete'))
plot(hclust(dist(rbind(x1,x2,x3,x4)),method = 'average'))
More information about the R-help