Skip to content
Prev 70721 / 398502 Next

A suggestion to improve ifelse behaviour with vector yes/noarguments

there is nothing problematic there! According to the help-page of 
ifelse(), in the Details section you get:

"If yes or no are too short, their elements are recycled."
                                                ^^^^^^^^
and this is what you get in your example.


Best,
Dimitris

----
Dimitris Rizopoulos
Ph.D. Student
Biostatistical Centre
School of Public Health
Catholic University of Leuven

Address: Kapucijnenvoer 35, Leuven, Belgium
Tel: +32/16/336899
Fax: +32/16/337015
Web: http://www.med.kuleuven.ac.be/biostat/
     http://www.student.kuleuven.ac.be/~m0390867/dimitris.htm




----- Original Message ----- 
From: "M??kinen Jussi" <Jussi.Makinen at valtiokonttori.fi>
To: <r-help at stat.math.ethz.ch>
Sent: Tuesday, May 31, 2005 4:15 PM
Subject: [R] A suggestion to improve ifelse behaviour with vector 
yes/noarguments