SWeave with non-R code chunks? SWeave with non-R code chunks? shell shell

SWeave with non-R code chunks?


The new new thing (for multi-language, multi-format) docs may be dexy.it which for example these guys at opengamma.org use as the backend.

Ana, who is behind dexy, is also giving a lot of talks about it so also look at the dexy blog.


It's not directly related to Sweave, but org-babel, which is part of Emacs org-mode, allows to mix code chunks of different languages in one file, pass data from one chunk to another, execute them, and generate LaTeX or HTML export from the output.

You can find more informations about org-mode here :

http://www.orgmode.org/

And to see how org-babel works :

http://orgmode.org/worg/org-contrib/babel/


There is certainly no easy way to do this other than through either foreign language interfaces from R (maybe through inline if it's supported), or system(). For what it's worth, I would just use system(); that should be easy enough.

You can see this previous question about having a Sweave equivalent for Python, where one of the respondents actually creates a separate interface. This can give you a sense what what it would take to embed other languages which may not already be supported. At a minimum, you have to do major hacking on the Sweave driver.