I often use Sweave to create LaTeX documents where certain pieces are produced dynamically by executing R code. This works well, but it is also possible to have pieces of code that execute in different ways, for example. by executing code in a shell, or by running Perl, etc.? It would be useful to be able to mix things, so I could do things like running some shell commands to extract some data, running some perl commands for preprocessing, and then running R commands to parse it.
Of course, I could use all the R fragments and use system() as a replacement for the poor, but that does not make a very pleasant reading in the document.
shell r sweave
Ken williams
source share