On Wed, 18 Apr 2007, Peter Dalgaard wrote:
> [EMAIL PROTECTED] wrote:
>> I get strange results when I try to format() an NA character string.
>>
>>
>>> x <- 'sometext'
>>> x[1] <- NA
>>> format(NA, width=32) # displays sensibly, right-justified
>>> format(x,width=32) # displays sensibly, left-ju
Peter Dalgaard biostat.ku.dk> writes:
> This happens on Linux too, given slightly larger widths:
>
> R version 2.5.0 RC (2007-04-17 r41210)
>
> > x <- as.character(NA)
> > format(x,width=64)
I can confirm this on Linux also.
> format(x,width=36)
[1] "NA "
[EMAIL PROTECTED] wrote:
> I get strange results when I try to format() an NA character string.
>
>
>> x <- 'sometext'
>> x[1] <- NA
>> format(NA, width=32) # displays sensibly, right-justified
>> format(x,width=32) # displays sensibly, left-justified
>> format(x,width=33) # displays ""
>> f
I get strange results when I try to format() an NA character string.
> x <- 'sometext'
> x[1] <- NA
> format(NA, width=32) # displays sensibly, right-justified
> format(x,width=32) # displays sensibly, left-justified
> format(x,width=33) # displays ""
> format(x,width=36) # R exits abnormal