Skip to content
Prev 245368 / 398506 Next

Ifelse stability problems?

On 2010-12-19 03:50, Luca Meyer wrote:
[...snip...]
You have a bit of a logic problem in your ifelse;
(look at your x$check after each of your ifelse()s);
try it this way:

  x$check <- NA
  x$check <- ifelse (x$x1 == "A (50-67%)",
     ifelse(x$x2<68&x$x2>49,"ok","xxxx"),
     x$check
  )

etc.

Peter Ehlers