R-alpha: R-0.14 problem

Kurt Hornik (Kurt.Hornik@ci.tuwien.ac.at)
Tue, 3 Dec 1996 08:32:26 +0100


Date: Tue, 3 Dec 1996 08:32:26 +0100
Message-Id: <199612030732.IAA17928@aragorn.ci.tuwien.ac.at>
From: Kurt Hornik <Kurt.Hornik@ci.tuwien.ac.at>
To: R-testers@stat.math.ethz.ch
Subject: R-alpha: R-0.14 problem

Here's another problem:

R> x <- matrix (rnorm(20), 10, 2)
R> lm(x ~ 1)
Error: subscript out of bounds

Upon closer inspection, one finds that the problem comes from

	dimnames(z$effects)[[1]] <- NULL

in lm.fit() ... in our case, dimnames(z$effects) is NULL, and the above
assignment fails (because integerSubscript() in main/subscript.c does).

(as an aside, if we do

R> colnames(x) <- c("A", "B")
R> lm(x ~ 1)

Call:
lm(formula = x ~ 1)

Coefficients:
                     A          B
(Intercept) -0.1611318 -0.1761543

as it should ...)

An obvious fix would be to do some is.null() testing im lm.fit(), but I
guess the real solution is to make such assignments work ...

Not that I have an idea for that ... :-)

-k
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
r-testers mailing list -- For info or help, send "info" or "help",
To [un]subscribe, send "[un]subscribe"
(in the "body", not the subject !)  To: r-testers-request@stat.math.ethz.ch
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-