Skip to content

Non-alignment of <NA> in rownames

2 messages · Yi, Derek, Brian Ripley

#
Hello everyone,

Apologies in advance if you have received this multiple times!

On a thread similar to that posted by Don MacQueen
(http://www.r-project.org/nocvs/mail/r-help/2002/3455.html): is there any
way to nicely format NA's when listed as rownames?  When NA's are part of
rownames, the alignment is thrown off:
[,1]
[1,]  100
[2,]  200
[3,]  300
[,1]
x     100
y     200
<NA>    300

This strikes me as strange, especially because the brackets don't affect NA
alignment elsewhere (like as an element in a dataframe or matrix).  Any
insights?

Thanks!
Derek
_                   
platform sparc-sun-solaris2.6
arch     sparc               
os       solaris2.6          
system   sparc, solaris2.6   
status                       
major    1                   
minor    5.1                 
year     2002                
month    06                  
day      17                  
language R

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
#
On Thu, 1 Aug 2002, Yi, Derek wrote:

            
That is fixed in 1.5.1, so this is clearly unrelated.
No one has previously reported this, and it does not occur anywhere in R
test suites (or we would have seen a difference when <NA> was introduced).
You can't have NA as a rowname for a data frame, and it seems peculiar to
have it as rowname for a matrix.

If you find a fix, please submit it to R-bugs with a bug report.