[R] save single image when using plot(lm(y~x))

Schreiber, Stefan Stefan.Schreiber at ales.ualberta.ca
Sat Nov 29 02:04:40 CET 2008


Thanks Paul!!

I wasn't aware of the command "plot.lm". Therefore, I couldn't find the
help-file either. 

Cheers,
Stefan


-----Original Message-----
From: Paul Hiemstra [mailto:p.hiemstra at geo.uu.nl] 
Sent: Friday, November 28, 2008 5:10 PM
To: Juliet Hannah
Cc: Schreiber, Stefan; r-help at r-project.org
Subject: Re: [R] save single image when using plot(lm(y~x))

Hi,

The plot function in R is a so called generic function, an appropriate 
function is chosen based on the input object provided by the user. In 
this case an lm-object (use the class() command to find this). The plot 
function that R calls is then called plot.lm. ?plot.lm gives you the 
help file and the first sentence in the help file already answers your 
problem.

hope this helps,
Paul

Juliet Hannah schreef:
> Try:
> mylm <- plot(lm(y~x))
> plot(mylm,which=2)
>
>
>
> On Fri, Nov 28, 2008 at 4:12 PM, Schreiber, Stefan
> <Stefan.Schreiber at ales.ualberta.ca> wrote:
>   
>> Dear List!
>>
>> When I'm using "plot(lm(y~x))" R shows me 4 different plots. They
pop-up
>> individually by clicking on the graph. How can I save for example the
>> 2nd plot? I've found a camera button that says  "copy to the
clipboard
>> as a metafile" once you place the mouse pointer on it. I tried,
though
>> it's not working.
>>
>> Any other suggestions?
>>
>> Thanks!!
>>
>> Stefan
>>
>>        [[alternative HTML version deleted]]
>>
>> ______________________________________________
>> R-help at 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.
>>
>>     
>
> ______________________________________________
> R-help at 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.
>   


-- 
Drs. Paul Hiemstra
Department of Physical Geography
Faculty of Geosciences
University of Utrecht
Heidelberglaan 2
P.O. Box 80.115
3508 TC Utrecht
Phone:     +31302535773
Fax:    +31302531145
http://intamap.geo.uu.nl/~paul



More information about the R-help mailing list