wssplot<-function(data,nc=15,seed=1246){
wss<-(nrow(data)-1)*sum(apply(data,2,var))
for(i in 2:nc){
set.seed(seed)
wss<-sum(kmeans(data,centers=i)$withinss)}
plot(1:nc,wss,type="b",xlab="Number of Clusters",
ylab="Within groups sum of squares")}
这位大佬,这段代码的含义是什么意思