Duncan Murdoch <[EMAIL PROTECTED]> wrote in
news:[EMAIL PROTECTED]: 

> On 09/02/2008 11:38 AM, David Winsemius wrote:
>> "Alexander Ovodenko" <[EMAIL PROTECTED]> wrote in
snipped
>> 
>> Which creates the model and immediately discards it, because no
>> durable object was given the values:
>>  
>>> But when try to get a fitted line, I enter the following:
>>> with(pol572a1, lm( share.gnp)<-lm(incmean~rgnpc))  
>> 
>> That does not look particular sensible. Assuming that the goal was
>> to create a model object named share.gnp, then try instead:
>> 
>> with(pol572a1, share.gnp.mdl <-lm(incmean~rgnpc) ) 
> 
> That won't work:  share.gnp.mdl will be created in the local
> environment created by with(), and then discarded.  You need to put
> it outside, i.e. 
> 
> share.gnp.mdl <- with(pol572a1, lm(incmean~rgnpc) )
> 

Thank you for the correction. I see that I was committing the same error 
I had described above it albeit in a different manner. I do hope he first 
saw your earlier post, or that of Onkelinx suggesting the "data= " 
approach before following me into a blind alley.

-- 
David Winsemius

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to