Re: [Rd] Dangerous Bug with IF function of R

2011-04-18 Thread salmajj
Thanks a lot Petr it works!!! You know for someone who is used to work with matlab it is not so obvious:) -- View this message in context: http://r.789695.n4.nabble.com/Dangerous-Bug-with-IF-function-of-R-tp3457976p3458300.html Sent from the R devel mailing list archive at Nabble.com. __

[Rd] Dangerous Bug with IF function of R

2011-04-18 Thread salmajj
hi! there is a bug with the IF operator that is really dangerous! please try the code below and if someone could explain to me why when (q is equal to 0.8, 0.9 or 1) R do not print it? q=0 for (j in 1:11){ if ((q==1)){ print(q) } q=q+0.1 } so in this code q is incr