Skip to content
Prev 389427 / 398503 Next

How to use ifelse without invoking warnings

Dear Ravi,
On 2021-10-08 8:21 a.m., Ravi Varadhan wrote:
The conditional if () else, which works on an individual logical value, 
uses lazy evaluation and so can avoid the problem you encountered. My 
guess is that implementing lazy evaluation for the vectorized ifelse() 
would incur too high a computational overhead for large arguments.

Best,
  John