Entering edit mode
Aditya Saxena
▴
10
@aditya-saxena-6706
Last seen 6.5 years ago
Dear List,
I am working on Affimetrix's HGU133Plus2 chip data GSE23343 from GEO
and
want to find the optimal number of clusters.
I am following http://koti.mbnet.fi/tuimala/oppaat/r2.pdf at pg 113
following code is there but when I tried, I do not find graph but
received
following error.
please suggest where I am doing mistake ?
kmax<-c(100)
> if(nrow(dat2)<100) {
+ kmax<-nrow(dat2)
+ }
km<-rep(NA,(kmax-1))
> i<c(2) while(i<kmax){="" +="" km[i]<-sum(kmeans(dat2,i,iter.max="20000,nstart=10)$withinss)" +="" if(i="">=3 & km[i-1]/km[i]<=1.01){
+ i<-kmax
+ } else {
+ i<-i+1
+ }
+ }
>
plot(2:kmax,km,xlab="K",ylab="sum(withinss)",type="b",pch="+",main="Te
rminated
when change less then 1%")
*Error in plot.window(...) : need finite 'ylim' valuesIn addition:
Warning
messages:1: In min(x) : no non-missing arguments to min; returning
Inf2: In
max(x) : no non-missing arguments to max; returning -Inf*
Many thanks,
[[alternative HTML version deleted]]