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 ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.