Skip to content

[R-pkg-devel] default col.names from data.frame not the same as as.data.frame

1 message · Spencer Graves

#
Hello, All:


 ????? What names should be given a matrix or data.frame that does not 
have names for use in "glm.fit"?


 ????? I ask for two reasons:


 ??? ??????? * "base" R is inconsistent:? "data.frame(matrix(1:2, 1))" 
defaults to "X1", "X2" but "as.data.frame(matrix(1:2, 1))" defaults to 
"V1", "V2".


 ??? ??????? * I want to use a toy example like this in the 
documentation for "BMA:::bic.glm.matrix" and "BMA:::bic.glm.data.frame", 
and since "base" R is inconsistent, I felt a need to ask a group like 
this for their preferences.


 ????? Thanks,
 ????? Spencer Graves