Using R 1.2.3 under both windows 95 and linux, format() works fine on a
numerical matrix, but converts a character matrix to a vector, apparently
omitting to convert it back to a matrix:
▾ Quoted text (2 lines)
a_matrix(c("axx","b","c","d","e","f","g","h"),nrow=2)
[,1] [,2] [,3] [,4]
[1,] "axx" "c" "e" "g"
[2,] "b" "d" "f" "h"
[1] "axx" "b " "c " "d " "e " "f " "g " "h "
▾ Quoted text (1 line)
format(a,justify="right")
[1] "axx" " b" " c" " d" " e" " f" " g" " h"
[1] "axx" "b " "c " "d " "e " "f " "g " "h "
[,1] [,2] [,3] [,4]
[1,] "axx" "c" "e" "g"
[2,] "b" "d" "f" "h"
Many thanks
----------------------------------------------------------------------------
John Peters
CSIRO National Measurement Laboratory
PO Box 218 Phone: +61 2 9413 7503
Lindfield NSW 2070 Fax: +61 2 9413 7202
Australia Internet: John.Peters@tip.CSIRO.AU
----------------------------------------------------------------------------
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel 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-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Message-ID:
<200105310727.JAA13483@pubhealth.ku.dk>