"Whit Armstrong" <[EMAIL PROTECTED]> writes:
> Is this a bug, or have I misunderstood the proper use of lm?
Dunno. It appears that logicals like factors are not supposed to have
matrix structure. What actually happens is that setting contrasts
strips dimension attributes
Browse[1]>
debug: for (
Is this a bug, or have I misunderstood the proper use of lm?
Thanks,
Whit
code:
x <- rnorm(50)
y <- matrix(as.logical(round(runif(100),0)),ncol=2)
NROW(x)==NROW(y)
lm(x~y)
> x <- rnorm(50)
> y <- matrix(as.logical(round(runif(100),0)),ncol=2)
> NROW(x)==NROW(y)
[1] TRUE
> lm(x~y)
Error in "[[