From D.Wischik at cs.ucl.ac.uk  Tue Apr 17 16:12:47 2007
From: D.Wischik at cs.ucl.ac.uk (D.Wischik at cs.ucl.ac.uk)
Date: Tue, 17 Apr 2007 16:12:47 +0200 (CEST)
Subject: [Rd] format() applied to an NA character string (PR#9616)
Message-ID: <20070417141247.4D4465DE7B@slim.kubism.ku.dk>


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 abnormally with code 5

> version
platform       i386-pc-mingw32
arch           i386
os             mingw32
system         i386, mingw32
status
major          2
minor          4.1
year           2006
month          12
day            18
svn rev        40228
language       R
version.string R version 2.4.1 (2006-12-18)

I'm running Windows XP.

Damon.



[Rd] format() applied to an NA character string (PR#9616)
D.Wischik at cs.ucl.ac.uk