Re: [R] "%03d" in the pdf command

From: Prof Brian Ripley <ripley_at_stats.ox.ac.uk>
Date: Sun 24 Jul 2005 - 03:26:36 EST

On Sat, 23 Jul 2005, Dennis Fisher wrote:

> The pdf man page contains the following text:
>
> pdf(file = ifelse(onefile, "Rplots.pdf", "Rplot%03d.pdf"),
> width = 6, height = 6, onefile = TRUE, family = "Helvetica",
> title = "R Graphics Output", fonts = NULL, version = "1.1",
> paper, encoding, bg, fg, pointsize)
>
> I am creating multi-page graphics in which each page is saved as a
> separate file. If I invoke onefile=T and I include "%03d" in the
> filename, each page is saved as a separate file. However, I don't
> understand the "%03d". Can someone explain? Am I calling a register
> that contains the page number?

See ?sprintf, or man printf on your system. It formats the page number in that C format.

-- 
Brian D. Ripley,                  ripley@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________
R-help@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
Received on Sun Jul 24 03:31:21 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:33:58 EST