Re: [Rd] nchar( NA )

From: Sarah Goslee <sarah.goslee_at_gmail.com>
Date: Fri, 18 Jun 2010 16:58:43 -0400

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

______________________________________________
R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Received on Fri 18 Jun 2010 - 21:05:36 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sat 19 Jun 2010 - 02:41:12 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive