I stumbled upon this when using update() (specifically update.lm()). If in the original call to lm(), say
a <- lm (y ~ x + z, data = mydata) where y and z are in data frame mydata but x is in the global environment. Then if later I run, a0 <- update (a, ~ . - z) a0$model will contain values of x in the global environment which may well be different, even different length from mydata$y. Somehow, update() pads a0$model to have the same number of rows as the length of x. I would think that it would desirable to use x as in a$model rather than the global one. Is this a bug or a deliberate feature? Thanks, Michael ______________________________________________ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel