0-extent matrices?

Thomas Lumley Thomas Lumley <thomas@biostat.washington.edu>
Sat, 11 Apr 1998 16:24:41 -0700 (PDT)

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?

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