Strange behaviour of lm
Guido Masarotto
guido@sirio.stat.unipd.it
Sun, 8 Nov 1998 17:34:12 +0100
R-0.62.4 running under linux
-------------------------------------------------------------------------------
> x <- rnorm(10)
> lm(x~x)
Error: length of namelist must equal dims
> x <- c(1,2,3)
> lm(x~x)
Call:
lm(formula = x ~ x)
Coefficients:
(Intercept)
2
> y <- x
> lm(y~x)
Call:
lm(formula = y ~ x)
Coefficients:
(Intercept) x
0 1
------------------------------------------------------------------------------
guido
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._