Skip to content
Prev 23011 / 398502 Next

NA rownames in dataframes

Hey everyone!

I am seeing strange behavior with NA in the rownames of dataframes:
X1.3
r1        1
<NA>      2
r3        3

Everything works.  The peculiar thing is that when the NA is in the first
row, things no longer work as I would have expected:
Error in if (missing(row.names) && (nrows[i] > 0) && (rowsi[[1]] != ""))
row.names <- data.row.names(row.names,  : 
	missing value where logical needed
Error in if (missing(row.names) && (nrows[i] > 0) && (rowsi[[1]] != ""))
row.names <- data.row.names(row.names,  : 
	missing value where logical needed
3: data.frame(..., check.names = FALSE)
2: cbind(...)
1: cbind(b)

This seems to be a problem associated only with dataframes, as a similar
example using matrices works perfectly fine.  Has anyone experienced this
behavior before?

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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._