Skip to content
Back to formatted view

Raw Message

Message-ID: <x2og9e1ka9.fsf@blueberry.kubism.ku.dk>
Date: 2000-02-18T17:40:30Z
From: Peter Dalgaard
Subject: "a.matrix[a.char.matrix]<- " crashes R (PR#447)
In-Reply-To: Prof Brian Ripley's message of "Fri, 18 Feb 2000 17:08:48 +0000 (GMT)"

Prof Brian Ripley <ripley@stats.ox.ac.uk> 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*.

Right.

> 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
~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk)             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: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._