From Kurt.Hornik@ci.tuwien.ac.at  Sun Apr 12 15:57:34 1998
From: Kurt.Hornik@ci.tuwien.ac.at (Kurt Hornik)
Date: Sun, 12 Apr 1998 16:57:34 +0200 (CEST)
Subject: 0-extent matrices?
In-Reply-To: <Pine.LNX.3.96.980411161742.11966A-100000@buffy>
References: <199804110856.KAA00986@sophie.ethz.ch>
 <Pine.LNX.3.96.980411161742.11966A-100000@buffy>
Message-ID: <13616.54878.596955.835572@aragorn.ci.tuwien.ac.at>

>>>>> Thomas Lumley writes:

> Implementing 0-extent matrices turns out to be easy -- it's almost
> entirely a matter of removing the tests for 0.  There seems to be only one
> thing that may require special-case handling, but I'm not sure what the
> Right Thing to do is.

> If m is a 0x4 matrix, say, what should 2*m, 2+m and so on return?

> Since m+m is a 0x4 matrix but 2*as.vector(m) is NA we can't have complete
> consistency.  My preference is for these operations to happen elementwise
> -- ie m+m is a 0x4 matrix.  Comments?

Sounds very much like going the Octave/MATLAB way.  I thought we'd
eventually have a `Matrix' class for such things?

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


0-extent matrices?
Kurt Hornik