[R] sweave tables as images?

Yihui Xie xie at yihui.name
Fri May 25 21:57:31 CEST 2012


You may take a look at knitr's graphics manual which tells you how you
can automatically crop the white margins:
https://github.com/downloads/yihui/knitr/knitr-graphics.pdf ("Cropping
PDF Graphics").

I'm not sure if pdfcrop works in this case, though.

Regards,
Yihui
--
Yihui Xie <xieyihui at gmail.com>
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA


On Fri, May 25, 2012 at 2:44 PM, Alexander Shenkin <ashenkin at ufl.edu> wrote:
> grid.table() works well, but using it in sweave creates graphics with
> very wide margins.  I'm sure this has something to do with grid, and not
> just grid.table.  Any idea how I can clip the graphic to the edges of
> the table graphic?  I've looked into viewports, etc, but I can't seem to
> find anything that will clip a graphic to its edges, perhaps with some
> defined margin.
>
> any help greatly appreciated!
>
> thanks,
> allie



More information about the R-help mailing list