I did
x <- matrix(ifelse(test, yes, no), nrow(yes), ncol(yes))
priding myself for doing it the "whole object way" ... and 'test' did
not recycle (in full accordance with the help page) w/o a warning.
Thanks,
Vadim
> -Original Message-
> From: Liaw, Andy [ma
> 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
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 message might be in order when someone