0-extent matrices?

Martin Maechler Martin Maechler <maechler@stat.math.ethz.ch>
Sat, 11 Apr 1998 10:56:16 +0200


>>>>> "TL" == Thomas Lumley <thomas@biostat.washington.edu> writes:

    TL> Is there a good reason not to allow matrix extents to be zero? 

No, I don't think so.

And I agree that it would be really useful to have them in circumstances
like yours.

    TL> I have been writing a function which fits glms under certain linear
    TL> constraints.  I fit the model with a reduced set of variables and
    TL> then transform back to the original set.  This involves operating
    TL> on submatrices of the covariance matrix and subsets of the
    TL> coefficients. Sometimes these subsets are empty.  A zero-length
    TL> subset of the coefficient vector causes no problems, but a 0x6
    TL> submatrix of the covariance matrix won't work with rbind and cbind.
    TL> There appears to be no difficulty in deciding how standard matrix
    TL> and array operations should work with a 0x6 matrix and in fact you
    TL> might expect that the same C code would usually work.

Could you look into implementing them? 

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