[Rd] Question about colnames behavior
Erich Neuwirth
erich.neuwirth at univie.ac.at
Sun Oct 2 09:39:36 CEST 2005
The following code
zzz<-1:10
dim(zzz)<-10
rownames(zzz)
colnames(zzz)
yields NULL for the rownames and colnames calls.
Let us set rownames
rownames(zzz)<-1:10
Now rownames(zzz) returns the expected result, but colnames(zzz)
produces an error:
Error in dn[[2]] : subscript out of bounds
So given a onedimensional structure the return behavior of colnames
is different depending on the fact if rownames are set or not.
Should the behavior of colnames be changed to make the result
independent from this fact?
--
Erich Neuwirth, Didactic Center for Computer Science
University of Vienna
Visit our SunSITE at http://sunsite.univie.ac.at
Phone: +43-1-4277-39902 Fax: +43-1-4277-9399
More information about the R-devel
mailing list