I'm looking for a way to create a pdf report that contains multiple graphs on one page as well as tables (ideally with some lines below categories etc.) . I have used the pdf(filename) followed by dev.off() to date but this prints one graph per page and does not seem to have functionality for tables. Thanks Sent from my BlackBerry? wireless device
On 06/06/10 19:26, bjlwilkinson at gmail.com wrote:> I'm looking for a way to create a pdf report that contains multiple graphs on one page as well as tables (ideally with some lines below categories etc.) . I have used the pdf(filename) followed by dev.off() to date but this prints one graph per page and does not seem to have functionality for tables. > ThanksLook at ?Sweave. PhG> Sent from my BlackBerry? wireless device > ______________________________________________ > R-help at 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. > >
For multiple figures on one page have a look at "An introduction to R" (pdf, downloadable from the net), page 72 For printing the data have a look at: library(gplots) help(textplot) HTH Jannis bjlwilkinson at gmail.com schrieb:> I'm looking for a way to create a pdf report that contains multiple graphs on one page as well as tables (ideally with some lines below categories etc.) . I have used the pdf(filename) followed by dev.off() to date but this prints one graph per page and does not seem to have functionality for tables. > Thanks > > Sent from my BlackBerry? wireless device > ______________________________________________ > R-help at 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. > >
Hi, ggplot2 and lattice also provide convenient ways to arrange multiple plots on a page. For tables, there's also a function based on Grid graphics in the gridExtra package. A typical dummy example might be, library(ggplot2) library(gridExtra) p = qplot(Sepal.Length, Petal.Length, data=iris, colour=Species) + facet_grid(~Species) tab = tableGrob(head(iris)) pdf("plotandtable.pdf") arrange(p, tab) dev.off() HTH, baptiste On 6 June 2010 19:26, <bjlwilkinson at gmail.com> wrote:> I'm looking for a way to create a pdf report that contains multiple graphs on one page as well as tables (ideally with some lines below categories etc.) . I have used the pdf(filename) followed by dev.off() to date but this prints one graph per page and does not seem to have functionality for tables. > Thanks > > Sent from my BlackBerry? wireless device > ______________________________________________ > R-help at 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. >-- ____________________ Baptiste Augui? Departamento de Qu?mica F?sica, Universidade de Vigo, Campus Universitario, 36310, Vigo, Spain tel: +34 9868 18617 http://webs.uvigo.es/coloides