[R] Table to pdf

Prof Brian Ripley ripley at stats.ox.ac.uk
Thu Dec 4 10:11:18 CET 2003


On Thu, 4 Dec 2003, Ana Conesa wrote:

>    I am new in R world and I haven't been able to find the answer to my
>    question in the documentation I looked up so far. I hope someone can
>    help. In the R function I am writing I have set the graphical output
>    to be saved into a pdf file. I would also like to include in this file
>    a table with some data, however I can't find the way to direct a table
>    to a graphics file.  Does anyone know the way to address this?

But a table is not a graphic!  Think of the graphics pdf file as something 
to be included in another document, not the final file.

Setting tables in PDF is not an R question.  But there is some help 
available in packages Hmisc and xtable to set tables in latex, which 
pdflatex can then turn into PDF.

The alternative would be to make a graphical representation of the table 
via calls to text etc, but that makes it much harder to achieve good 
typography.

-- 
Brian D. Ripley,                  ripley at 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




More information about the R-help mailing list