Skip to content
Prev 245394 / 398506 Next

Ifelse stability problems?

On Dec 19, 2010, at 15:01 , Peter Ehlers wrote:

            
Yes. The whole thing can be written much more concisely, though:

lw <- c(49,9,4,0,9)
up <- c(68,21,16,6,21)

x$check <- ifelse(x$x2 < up[x$x1] & x$x2 > lw[x$x1], "ok", "xxxx")