Skip to Content

How to assign different colors to observation points in different clusters using R's clusplot

The R documentation at http://stat.ethz.ch/R-manual/R-devel/library/cluster/html/clusplot.default.html isn't exactly helping me. Code:

somedata = read.data("somefile.tsv")
clustered = kmeans(somedata, 5)
library(cluster)
clusplot(somedata, clustered$cluster, cex=0.1, ..??whatshouldgohere??..)