[R] Sweave-LaTEX question

Liviu Andronic landronimirc at gmail.com
Mon Oct 13 00:26:09 CEST 2008


Hello Felipe,

On Mon, Oct 13, 2008 at 12:55 AM, Felipe Carrillo
<mazatlanmexico at yahoo.com> wrote:
> Liviu: I installed RcmdrPlugin.Export but couldn't figure out how to make it work. What do I need to do with the "Export objects using xtable" command? Do I need to have pdflatex in order to create pdf'f with graphics and tables?
>
To be able to compile a LaTeX (or LyX) document you will need some
LaTeX distribution installed. See previous posts for more on this.


> I wonder if you could provide a small example on how to use this package. Thanks a lot for your suggestions. Felipe
>
To get anything from the Export Plugin, do some statistical analysis
with Rcmdr (like numSummaries), and then activate the "Export
objects.....". Two potentially useful informations will be printed:
the R xtable()-related generated code (1) and the output LaTeX code
(2).

Essentially you have the following options. Use the R code in
conjuction with LaTeX (or Lyx) and Sweave (that is, use the R code in
Sweave code chunks as if it were a statistical analysis), or copy and
paste the LaTeX code into a LaTeX (or LyX, via its ERT) document.
Either way, if the LaTeX document compiles, you will have the
corresponding analyses tables into the output .pdf.

Note that the Export Plugin is limited to handling
objects---basically, tables---printed within Rcmdr (that is, the
Plugin will not handle objects printed in the R console). Thus, it is
probably of help to those using Rcmdr to teach R to students, and to
those familiarizing themselves with exporting R results to LaTeX (with
R altogether).

I cc-ed r-help to make these instructions publicly available. Please
post back if you still have questions.

Regards,
Liviu



More information about the R-help mailing list