如何使用R的clusplot为不同群集中的观察点分配不同的颜色

ver*_*rve 1 r

http://stat.ethz.ch/R-manual/R-devel/library/cluster/html/clusplot.default.html上的R文档对我没有帮助.码:

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

Dav*_*son 6

使用col.p参数:

clusplot(somedata, clustered$cluster, cex=1, col.p=clustered$cluster)
Run Code Online (Sandbox Code Playgroud)