Re: [Rd] variable scope in update(): bug or feature?

From: Michael <wuolong_at_gmail.com>
Date: Fri 22 Dec 2006 - 19:16:02 GMT

On 22 Dec 2006, Brian Ripley wrote:

> 'update' will update and (by default) re-fit a model. It does this
> by extracting the call stored in the object, updating the call and
> (by default) evaluating that call. Sometimes it is useful to call
> 'update' with only one argument, for example if the data frame has
> been corrected.

Thanks. I understand now that this is the expected behavior per the documentation.

It is just that when I call 'update (m1, ~ . - z)' I did not expect x to change (or everything can be different if mydata has changed). I only wanted to evaluate the old model with old data but sans the z variable.

Would it be useful to have an option in update() not to update the data (i.e., behaves more like drop1())?

Michael



R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Sat Dec 23 06:23:32 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Fri 22 Dec 2006 - 22:31:04 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.