[R] How to feed graphic device (png, jpeg etc) with different files names

Jun Shen jun.shen.ut at gmail.com
Sat Jul 4 05:05:44 CEST 2015


Dear list,

I define a function to export a bunch of plots. A sample code is something
like the follow

export.plots<-function(export.type='pdf',...){

match.fun(export.type) (...)

print(plot.func1(...))
print(plot.func2(...))
print(plot.func3(...))
...
print(plot.funcn(...))

dev.off()

}

If I do pdf , everything can be exported into one file. But for other
devices, each graph is one file. Since I have so many graphs to export, I
can't tell which is what from the file names. I was thinking if I can
construct a file name for each of the 'print" function then to feed the
information to the graphic device to have an informative file name. Is it
possible? Thanks.

Jun

	[[alternative HTML version deleted]]



More information about the R-help mailing list