[TxMt] R, Sweave, markdown
Hans-Jörg Bibiko
bibiko at eva.mpg.de
Mon Apr 28 06:23:33 UTC 2008
In principal it won't be such a big deal to write such a parser. But
the problems will appear in the details. One has to create a kind of
meta syntax - processing statements - for all these R chunks. E.g.
@RCODE quiet@
a <- matrix(c(1,2,3,4,5,6), nrow=2 byrow=T)
@/RCODE@
foo foo
@RCODE insertAsTable noCommandLine@
print(a*2)
@/RCODE@
etc.
But this would be mean to reinvent the wheel twice in some sense.
Markdown to LaText and Sweave for LaTeX works fine.
On the other hand I use quite often the R bundle command 'Execute
Selection/Document in R and' > 'Insert Result' for such things.
Of course, to have such a pre-parser for expanding R code chunks and
insert the result depending on the current language (HTML, LaTeX,
Markdown, Plain Text) would be nice.
--Hans
More information about the textmate
mailing list