10

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.

user2763361
  • 435
  • 2
  • 11

3 Answers3

3

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

library(xtable)

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.

Fran
  • 80,769
2

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.

G. Poore
  • 12,417
0

Lena is an architectural framework for data analysis (I am its author). It is written in Python.

It allows to create many plots and tables without code repetition. It uses jinja engine to render LaTeX templates from Python, and facilitates creation of PDF files (it calls pdflatex from Python's subprocess module) as well as PNG files (which you can use for HTML).

Among its features is that already created plots are not recreated (unless their template or data were changed). This is useful when you generate many figures.