[Rd] "a.matrix[a.char.matrix]<- " crashes R (PR#447)
Peter Dalgaard BSA
18 Feb 2000 18:40:30 +0100
Prof Brian Ripley <email@example.com> writes:
> I think that is the correct behaviour. (What is the expected
> behaviour? It is what I expected.) A k-index (aka matrix or array
> subset) is supposed to give the indices of the elements to be
> extracted/replaced. I suppose character values could be matched to
> dimnames, but that would be a new idea.
...but what the user most likely expected!
We might want to *warn*.
> On the other hand, S-PLUS's print routine seems to ignore the added
> elements, and R loses the dim attribute.
As usual when length and dims develops a mismatch... R is saner, I think
> repeated *new *indices.
> The hackery in StringSubscript was copying the wrong string as a name
> for duplicate string indices. Fixed.
So did I but not correctly (had indexnames instead of s). Thanks.
O__ ---- Peter Dalgaard Blegdamsvej 3
c/ /'_ --- Dept. of Biostatistics 2200 Cph. N
(*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918
~~~~~~~~~~ - (firstname.lastname@example.org) FAX: (+45) 35327907
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: email@example.com