Skip to content
Prev 318887 / 398521 Next

About basic logical operators

This is a bit off the original topic, but you should really put spaces around the "<".
Otherwise you might be surprised when you compare x to -0.2 instead of +0.2:
   > x<-seq(-1,1,by=0.02)
   > x[x<-0.2] 
   numeric(0)
   > x
   [1] 0.2


Bill Dunlap
Spotfire, TIBCO Software
wdunlap tibco.com