[R] Lightweight store plots as images.

Greg Snow Greg.Snow at imail.org
Sun Feb 6 03:47:18 CET 2011


I would use a pdf file, see ?pdf for examples.  This plots a bunch of plots to a single file.  You can also use tools like png (see ?png for examples) which will create 1 file per plot.  You can either specify a name each time, or set a name pattern and have it fill in automatically.  Either way the plots go straight to files without plotting on the screen.

-- 
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.snow at imail.org
801.408.8111


> -----Original Message-----
> From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-
> project.org] On Behalf Of Alaios
> Sent: Saturday, February 05, 2011 2:22 PM
> To: R-help at r-project.org
> Subject: [R] Lightweight store plots as images.
> 
> Dear all I would like to store a few hundrends images to my hard disk
> so I need your comment that is the most efficient way in R to do
> 
> for i in c(1:100){
>   A. create plot with title # I do not want to give output to screen\
>   B. store it as an image using plot's title as filename
>   C. Destroy that 'object'
> }
> 
> I do not have any experience so can I have some advice from your side?
> 
> Best Regards
> Alex.
> 
> ______________________________________________
> 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.



More information about the R-help mailing list