Sunday, March 6, 2011

My solution for Vim + Sweave + Python + Latexmk

I of course write all my documents in LaTeX, and lately I've been into using two excellent tools for writing papers on quantitative topics: Sweave (/ɛs wiv/) and the python.sty package. The former allows you to include R code in the TeX source of your document, which is executed as the document is compiled, with its output (including figures) appearing in the document. The latter does the same thing for Python rather than R. With the two of them, one can include all of one's data processing and statistical code in the very paper that reports on them.