[Rd] nchar( NA )
Sarah Goslee
sarah.goslee at gmail.com
Fri Jun 18 22:58:43 CEST 2010
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
More information about the R-devel
mailing list