Skip to content
Prev 326014 / 398503 Next

Ifelse leading to inconsistent result

On Jun 26, 2013, at 17:40 , Neville O'Reilly wrote:

            
Don't use ifelse, it just confuses the logic.

As far as I can tell, the code is equivalent (except for integer conversion) to

 CountLoss[i] <- (minlogP < log(950000)) | (maxlogP <= log (1000000))
 CountProf[i] <- (maxlogP >= log (1100000))

and that doesn't look mutually exclusive to me.