[R] graphics - current filename

Uwe Ligges ligges at statistik.uni-dortmund.de
Mon Feb 14 08:40:42 CET 2005


Paul Sorenson wrote:

> I would like to query R for the current (or last used) filename for a graphics device.
> 
> Eg after png(filename="plot%02d.png") I would like something like the output of dev.cur() but with the %02d expanded to the current name.

You cannot, it is handled internally and the name is not returned.
So you have to workaround yourself either by specifying filenames 
yourself and looping over the png() calls, or counting yourself ...

Uwe Ligges


> Can anyone point me at where I can find this please?
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html




More information about the R-help mailing list