Re: [Rd] possible bug in model.matrix

2005-09-13 Thread Peter Dalgaard
"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 (

[Rd] possible bug in model.matrix

2005-09-13 Thread Whit Armstrong
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 "[[