R-alpha: Matrix: I surrender

Thomas Lumley thomas@biostat.washington.edu
Wed, 13 Aug 1997 09:21:00 -0700 (PDT)


To make what I was saying a little clearer, the fact that eg
y<-x[vec,]
y[1,]
returns an error if vec is of length 1 (or has one T, &c) is compatible
with S, but not with what most people expect when writing programs.
Statements like y<-x[vec,] nearly always need drop=F as otherwise any
future references to y must have special cases to handle vectors. 

The problem is that we should have drop=F when indexing by vectors that
happen to be of length 1 and drop=T when indexing by scalars. I suppose
it's reasonable to say that programmers can take care of themselves and we
should choose the best default for interactive use, which is certainly
drop=T. 

Perhaps we just need a mental health warning in the documentation and/or
the faq to remind programmers that array dimensions can vanish whenever
you subset. 

Also

Kurt wrote:
> 
> * Thomas, if you have ports of the above software, could you PLEASE
> package them?  (Btw, I have a finished `port' of the V&R `classif'
> library, and of the `clus' library which comes with the paper on JSS.)
> 

 I have ported the addreg library, with additions (and sent it back to
 Harald Fekjaer, who should be releasing it Real Soon Now).  The linear
 discrimination code I referred to is long obsolete and has been fixed (I
 saw it in 1992, I think). I'm intermittently working on the bayesian
 model averaging code, which was the major reason for creating the "leaps" 
 subset selection library. 


Thomas Lumley
-----------------------------------------------------+------
Biostatistics		: "Never attribute to malice what  :
Uni of Washington	:  can be adequately explained by  :
Box 357232		:  incompetence" - Hanlon's Razor  :
Seattle WA 98195-7232	:				   :
------------------------------------------------------------

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
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
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-