From sarah.goslee at gmail.com  Fri Jun 18 22:58:43 2010
From: sarah.goslee at gmail.com (Sarah Goslee)
Date: Fri, 18 Jun 2010 16:58:43 -0400
Subject: [Rd] nchar( NA )
In-Reply-To: <4C1BDC89.50003@r-enthusiasts.com>
References: <4C1BDC89.50003@r-enthusiasts.com>
Message-ID: <AANLkTimV5wJTILsifdwPUv7ROY-WY9buNLE937IuqVAa@mail.gmail.com>

Hi Romain,

Did you read the help for nchar?

Value:

     For ?nchar?, an integer vector giving the sizes of each element,
     currently always ?2? for missing values (for ?NA?).

It may be unexpected behavior, but it's *well-documented* unexpected behavior.

Sarah

On Fri, Jun 18, 2010 at 4:52 PM, Romain Francois
<romain at r-enthusiasts.com> wrote:
> Hello,
>
> Is this expected ?
>
>> nchar( c( "", NA ) )
> [1] 0 2
>
> Should not the second one be NA ?
>
> Romain
>


-- 
Sarah Goslee
http://www.functionaldiversity.org



[Rd] nchar( NA )
Sarah Goslee