[Rd] Cleaning up in the bugs repository

Jens Oehlschlägel-Akiyoshi jens.oehlschlaegel-akiyoshi@mdfactory.de
Mon, 28 Feb 2000 19:22:04 +0100



Peter,

you wrote

> Jens O-A's:
> "as.matrix.data.frame() modifies content of character columns"
>
> was moved to Documentation-fixed. The behaviour is Splus compatible,
> so hardly fixable.

this is shocking bad news, as it means, that we stay with a severe bug, be
it in S+ or not.
It means, we can't be shure, that the CONTENT of a character data remains
unchanged, if we rearange the data.

x1 <- '"'
x2 <- data.frame(I(x1))
x3 <- as.matrix(x2)

> x1
[1] "\""
> x2[1,1]
[1] "\""
> x3[1,1]
[1] "\\\""


I came across this, when I tried to write a function, which exports R data
reliably to flatfiles. Of course I used as.matrix.data.frame as it is a
basic function, but

IF this bug remains in R, there can just be one consequence: NEVER use
as.matrix, at least with character data AND REMEMBER not to use it.

Very unhappy about this




-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._