Skip to content
Prev 78629 / 398502 Next

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

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: