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

From: Schreiber, Stefan <Stefan.Schreiber_at_ales.ualberta.ca>
Date: Fri, 28 Nov 2008 18:04:40 -0700

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

______________________________________________
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.
Received on Sat 29 Nov 2008 - 01:08:31 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sat 29 Nov 2008 - 03:30:28 GMT.

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

list of date sections of archive