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.