From TimHesterberg at gmail.com  Tue Aug 26 06:55:46 2008
From: TimHesterberg at gmail.com (Tim Hesterberg)
Date: Tue, 26 Aug 2008 06:55:46 +0200
Subject: [Rd] ifelse
In-Reply-To: <g8d0v5$cet$1@ger.gmane.org> (Heikki.Kaskelma@nbl.fi)
References: <g8d0v5$cet$1@ger.gmane.org>
Message-ID: <200808260455.m7Q4tkt5023095@hypatia.math.ethz.ch>

Others have commented on why this holds.

There is an alternative, 'ifelse1', part of the splus2R package, that
does what you'd like here.

Tim Hesterberg

>I find it slightly surprising, that
>   ifelse(TRUE, character(0), "")
>returns NA instead of character(0). 
>
>-- 
>Heikki Kaskelma



[Rd] ifelse
Tim Hesterberg