RE: [R] ifelse when test is shorter than yes/no

2004-05-20 Thread Liaw, Andy
From: Vadim Ogranovich Hi, It turns out that the 'test' vector in ifelse(test, yes, no) is not recycled if it is shorter than the other arguments, e.g. ifelse(TRUE, seq(10), -seq(10)) [1] 1 Is there any particular reason it is not recycled? If there is one indeed a warning

RE: [R] ifelse when test is shorter than yes/no

2004-05-20 Thread Vadim Ogranovich
with the help page) w/o a warning. Thanks, Vadim -Original Message- From: Liaw, Andy [mailto:[EMAIL PROTECTED] Sent: Thursday, May 20, 2004 2:20 PM To: Vadim Ogranovich; R-Help Subject: RE: [R] ifelse when test is shorter than yes/no From: Vadim Ogranovich Hi