Dear all, I don't know why the following doesn't work. if(cls$size[1]>cls$size[2]) {cls1<-tempforce[cls$cluster==1];cls2<-tempforce[cls$cluster==2]} else {cls1<-tempforce[cls$cluster==2];cls2<-tempforce[cls$cluster==1]} Error: syntax error What is the problem here? thanks. Ming