Skip to content
Back to formatted view

Raw Message

Message-ID: <43A95E63.20006@fz-rossendorf.de>
Date: 2005-12-21T13:53:39Z
From: Joerg van den Hoff
Subject: inconsistent behaviour of ifelse and if ... else

is the behaviour

val <- ifelse(TRUE, numeric(0), 123)
val  #NA

intended or is it a bug, i.e. should an empty object be returned as 
might be expected(also in comparsion to what an explicit
val <- {if(TRUE) numeric(0) else 123} yields)?

thanks,

joerg