[R] Dont print plot on screen

Duncan Murdoch murdoch.duncan at gmail.com
Wed Dec 8 14:18:51 CET 2010


On 08/12/2010 8:14 AM, Joel wrote:
>
> Hi is there any command or setting that allows you to do the plot command but
> it dose not print the plot on screen?
>
> So when you are saveing an plot in a function you dont want it to display
> the plot just save it.

Yes, that's the normal behaviour when plotting to a file.  Just open a 
device in the output format you want.  For example,

pdf(file="example.pdf")
plot(rnorm(100))
dev.off()


Duncan Murdoch



More information about the R-help mailing list