Skip to content
Prev 284271 / 398502 Next

nested if else statements

Much easier: use ifelse (the vectorized function) instead as follows:

ifelse(A < 2, ifelse(A < 1, 2, 1), 0)

But you could probably just do 2 - A in this case which would be easiest.

Michael

On Sun, Feb 5, 2012 at 5:30 PM, Philip Robinson
<philip.c.robinson at gmail.com> wrote: