Re: [R] add leading 0s to %d from png() {was Automatic creation of file names}

2005-10-08 Thread Prof Brian Ripley
The example on the png help page, "Rplot%03d.png", _is_ what you want. (More details are on ?postscript.) formatC() is an S/R peculiarity: sprintf() is the cross-language way to do this sort of thing. On Sat, 8 Oct 2005, bogdan romocea wrote: > Dear useRs, > > Is there a way to 'properly' forma

[R] add leading 0s to %d from png() {was Automatic creation of file names}

2005-10-08 Thread bogdan romocea
Dear useRs, Is there a way to 'properly' format %d when plotting more than one page on png()? 'Properly' means to me with leading 0s, so that the PNGs become easy to navigate in a file/image browser. Lacking a better solution I ended up using the code below, but would much prefer something like