Re: [R] update() ignores object

2011-08-15 Thread Sverre Stausland
That works! Thanks. On Mon, Aug 15, 2011 at 5:09 PM, Bert Gunter wrote: > Sverre: > > As your reproducible example shows, the problem is that the string > "y1:y2" is not an acceptable term of the formula. One way round this > is simply convert the non-string part of the formula to a string, pase

Re: [R] update() ignores object

2011-08-15 Thread Bert Gunter
Sverre: As your reproducible example shows, the problem is that the string "y1:y2" is not an acceptable term of the formula. One way round this is simply convert the non-string part of the formula to a string, pase it with your term, and then reconvert it to a formula: update(my.lm,formula(paste(

[R] update() ignores object

2011-08-15 Thread Sverre Stausland
Hi all, I'm extracting the name of the term in a regression model that dropterm specifies as the least significant one, and I'm assigning this name to an object. However, when I use update(), it ignores this object. Is there a way I can make it not ignore it? A reproducible example is below: > lm