[R] Formatting Sweave in R-News

Paul Murrell paul at stat.auckland.ac.nz
Wed Aug 22 08:30:08 CEST 2007


Arjun Ravi Narayan wrote:
> Hi,
> I am editing a document for submission to the R-news newsletter, and
> in my article my Sweave code inserts a dynamically generated PDF
> report that my R program generates.
> However, when I insert the PDF using the following Sweave code:
> \newpage
> \includegraphics[scale=1.0]{\Sexpr{print(location)}}
> \newpage
> (in tex this looks like):
> \newpage
> \includegraphics[scale=1.0]{/home/arjun/sample.pdf}
> \newpage

Try putting your image in a figure* environment (should go full width of 
the page).


> However, the r-news style package over-rides everything that I can set
> (including using the minipage option) to make my included PDF small
> sized. Part of the problem is that the R-news style specifies a
> two-column formatting, and so the PDF is shrunk to fit in one column.
> How can I, for just one page, over-ride the styles to include the PDF?
> Even if I hard-hack the graphics to be scaled up in size, that does
> not get rid of the vertical line that in between the two columns, and
> thus breaking my image.
> I realise that this is not an R problem, but more a latex problem, but
> I am hoping that somebody has faced similar problems with the Rnews
> styles and has an idea on how to do this.
> Thank you,
> Yours sincerely,

Dr Paul Murrell
Department of Statistics
The University of Auckland
Private Bag 92019
New Zealand
64 9 3737599 x85392
paul at stat.auckland.ac.nz

More information about the R-help mailing list