I do data mining in R, Python and various object oriented languages. I like using LaTeX to present my results; either to myself (i.e. use them for result interpretation/analysis) or to send to colleagues.

What are tools are there that I can use to speed up the mass and automated production of results (tables and charts)? I know of Sweave which was a necessary condition for me to be able to justify LaTeX over an alternative of automatically generating HTML documents with my results. Without this I would not be able to use LaTeX in my work. What tools are there that I can use to make the 'next step' and leave HTML in the dirt once and for all?

I use Eclipse with StatET at the moment.


Use the RStudio editor. This program allow to start with a basic .Rnw document, insert and run R chunks or obtain directly the PDF with one click, without compiling yourself the intermediate .tex file. RStudio can work with both Sweave and the knitr package. This is explained better in the RStudio documentation.

Use xtable R package to obtain LaTeX tables. For example, to show a dataframe foo as a LaTeX table you only need this chunk:

<< Example,echo=F,results=tex >>=      


xtable(foo, caption="An example")


Insert chunks with figures (with the option fig=T) in figure floats. Captions and plain text can include \Sexpr{}, so you can automatize in some extent even the LaTeX text creation through R.

| improve this answer | |
  • 1
    This can also be achieved with latex() from package Hmisc (only if you didn't already know .. but xtable is great as well) – user2763361 Oct 24 '13 at 6:53
  • @user2763361, I know that but I forgot to mention. Good point. – Fran Oct 27 '13 at 7:20

PythonTeX allows you to execute Python code in LaTeX documents and access the output. The result is similar to Sweave. It allows user-defined sessions that run in parallel and are cached automatically, to optimize performance. The package also supports running Julia and Ruby code. In principle, it should be possible add support for additional languages with minimal effort.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.