R-alpha: ifelse()

Jim Lindsey (jlindsey@luc.ac.be)
Fri, 15 Nov 1996 09:06:56 +0100 (MET)


From: Jim Lindsey <jlindsey@luc.ac.be>
Message-Id: <9611150806.AA12434@alpha.luc.ac.be>
Subject: R-alpha: ifelse()
To: r-testers@stat.math.ethz.ch
Date: Fri, 15 Nov 1996 09:06:56 +0100 (MET)

Suppose that y is a vector containing non-negative (integral) values.
Why does ifelse(y>0,1,0) return a vector while
ifelse(y>0&&dist="Poisson",1,0) returns a scalar?
Jim
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
r-testers mailing list -- To (un)subscribe, send
subscribe	or	unsubscribe
(in the "body", not the subject !)  To: r-testers-request@stat.math.ethz.ch
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-