[R] multiple page pdf file using pdf()

Peter Dalgaard P.Dalgaard at biostat.ku.dk
Mon Sep 29 18:43:58 CEST 2008

Kyle Matoba wrote:
> List,
> I am currently producing a series of charts using multiple calls to pdf()
> but, rather than having 'n' single plot files, would like them all to go
> into one 'n'-page pdf file. Would someone be so kind as to explain how, if
> at all, I might go about doing this from within R? I have only ever
> previously used devices besides x11 by analogy with printing things to x11.
> I am running R-2.7.2 on Red Hat Linux.
Did you as much as look at help(pdf)????

Specifically, there is a "onefile" argument. It is even TRUE by default!
So just don't close and reopen the device between plots.

   O__  ---- Peter Dalgaard             Øster Farimagsgade 5, Entr.B
  c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
 (*) \(*) -- University of Copenhagen   Denmark      Ph:  (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)              FAX: (+45) 35327907

More information about the R-help mailing list