Skip to content
Prev 20098 / 398500 Next

someProblem in R-1.4.1

vito muggeo wrote:
During fix()-ing  the matrix got column names, and dimnames() got a list
of two elements (it was not before!).
Please read ?dimnames. The *second* example is not documented to work.

You can always assign names as described on the help page:
   dimnames(M) <- list(NULL, c("a","m","m","m","m"))

Or just use 
   colnames(M) <- c("a","m","m","m","m")
nr <- 20
 M <- matrix(0, nr, 5)
 for(i in 1:nr) M[i,] <- 1:5

works for me. Can you provide an example?
Uwe Ligges
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._