David Winsemius wrote:
>
>
> On Dec 9, 2009, at 12:40 PM, carol white wrote:
>
>> Hi,
>> Is there any equivalent for ifelse (except if (cond) expr1 else
>> expr2) which takes an atomic element as argument but returns vector
>> since ifelse returns an object of the same length as its argum
On 09/12/2009 12:40 PM, carol white wrote:
Hi,
Is there any equivalent for ifelse (except if (cond) expr1 else expr2) which
takes an atomic element as argument but returns vector since ifelse returns an
object of the same length as its argument?
I don't understand what's wrong with "if (c
On Dec 9, 2009, at 12:40 PM, carol white wrote:
Hi,
Is there any equivalent for ifelse (except if (cond) expr1 else
expr2) which takes an atomic element as argument but returns vector
since ifelse returns an object of the same length as its argument?
x = c(1,2,3)
y = c(4,5,6,7)
z = 3
ife
Try this:
list('TRUE' = x, 'FALSE' = y)[[as.character(as.name(z <= 1))]]
On Wed, Dec 9, 2009 at 3:40 PM, carol white wrote:
> Hi,
> Is there any equivalent for ifelse (except if (cond) expr1 else expr2) which
> takes an atomic element as argument but returns vector since ifelse returns
> an ob
4 matches
Mail list logo