Skip to content

format() of a character matrix converts to vector (PR#960)

1 message · John.Peters@tip.csiro.au

#
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:
[,1]  [,2] [,3] [,4]
[1,] "axx" "c"  "e"  "g" 
[2,] "b"   "d"  "f"  "h"
[1] "axx" "b  " "c  " "d  " "e  " "f  " "g  " "h  "
[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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._