[R] if..else.. need help

msck9@mizzou.edu msck9 at mizzou.edu
Fri Mar 25 19:24:12 CET 2005


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




More information about the R-help mailing list