[R] One pdf file with plots and text output

Prof Brian Ripley ripley at stats.ox.ac.uk
Wed Oct 17 11:00:43 CEST 2007


On Wed, 17 Oct 2007, Rainer M Krug wrote:

> Hi
>
> I create one pdf file with plots via pdf() and one text file with text
> via sink() that works very nice. But I would prefer to have one pdf file
> with plots and the text which I store in the te=xt file via sink(). I.e.
>
> x.lm<-lm(...)
> pdf()
> plot(x.lm)
> NOW THE TEXT OF summary(xlm) IN THE PDF FILE
> dev.off()
>
> Is this possible or is there a different format which I could use?

You can easily post-process the files to obtain a single file.  Going from 
text to pdf involves many arbitrary choices, but a good text processor 
will help you make those and incorporate pdf figures: I would use 
pdflatex, but there are many other tools to do the job.

-- 
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