From jens.oehlschlaegel-akiyoshi@mdfactory.de  Mon Feb 28 18:22:04 2000
From: jens.oehlschlaegel-akiyoshi@mdfactory.de (=?iso-8859-1?Q?Jens_Oehlschl=E4gel-Akiyoshi?=)
Date: Mon, 28 Feb 2000 19:22:04 +0100
Subject: [Rd] Cleaning up in the bugs repository
In-Reply-To: <x2aekl6xhr.fsf@blueberry.kubism.ku.dk>
Message-ID: <000b01bf8218$b787a790$a9021aac@joelschlaegel>



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


[Rd] Cleaning up in the bugs repository
=?iso-8859-1?Q?Jens_Oehlschl=E4gel-Akiyoshi?=