[R] Adding pagebreaks on files???

Julian Burgos jmburgos at u.washington.edu
Tue Oct 30 00:24:36 CET 2007


I do this all the time.  Simply,

a) Open your pdf file using the pdf function.
b) Do a bunch of plots.  Because now the pdf file is your active device,
every time you call a new plot you should get a new page.  You can also
use par(mfrow=...) to split the page (the same way you do it on a
window), etc.
c) Close the connection to the pdf using dev.off().

Julian

Tom.O wrote:
> Hi 
> Does anyone know if its possible to add pagebreaks to an pdf through an R
> command? I'm running a loop  where each session exports an pdf graph. Each
> image becomes a separate file, but I would like to have them in the same
> document but on separate pages.
> 
> Does anyone know a solution or workaround?
> 
> Regards, Tom



More information about the R-help mailing list