[Rd] Tiny bug in lm()?

Martin Maechler m@echler @ending from @t@t@m@th@ethz@ch
Wed Jul 18 15:40:53 CEST 2018

>>>>> Brett Presnell 
>>>>>     on Sun, 24 Jun 2018 13:57:04 +0100 writes:

    > I meant ncol(y) of course.

    > Brett Presnell <presnell using ufl.edu> writes:

    >> I suppose that this never affects anything, but in line
    >> 57 of lm.R, where the coefficients are defined for an
    >> empty model, when y is a matrix, shouldn't the value be
    >> matrix(,0,nrow(y)) rather than matrix(,0,3)?

Yes ("ncol(y)") and actually it should be 'double', not

OTOH: Multivariate empty models are probably pretty rare, so no
      wonder this has never been reported the last 13.374 years
      this has been in the sources.

Of course, I will still fix it.  Thank you, Brett, for reporting!


More information about the R-devel mailing list