Sweave update
0
0
Entering edit mode
@friedrichleischcituwienacat-7
Last seen 10.3 years ago
I have committed an Sweave update to the devel version of R (also avaliable form the usual place at http://www.ci.tuwien.ac.at/~leisch/Sweave) which should fulfill all pending feature requests: *) The major change is that the syntax is no longer hard-wirded, but can be specified by the user (OK, there is almost no docu for that, but the code is in place). I provide (in addition to noweb) a latex-style syntax which looks like \begin{Scode}{fig=TRUE} plot(1:10) \end{Scode} and is used if the input file has extension .[RS]tex, or if \SweaveSyntax{SweaveSyntaxLatex} appears in the document (one can also use the command line or an option() to specify the default syntax). There is an example .Stex on the web page. *) Code chunks can be reused, i.e. <>= ... @ <<c>>= ... <> ... @ works. *) Hooks are now more compatible with the load hooks used by library() in the sense that they now should be stored in option("SweaveHooks"), which is a list of functions. A more general framework for handling hooks in R would of course help. *) The user can define arbitrary options with the sole purpose of running the hooks associated with them. E.g., cleaning the workspace before running each code chunk could be done by defining a hook for option `clean' and having \SweaveOpts{clean=TRUE}. Probably we should start collecting useful hooks and include them in the standard distribution. The only thing that is really missing is proper testing (due to lack of time)... so please don't kill me if I have introduced a number of serious bugs. Bioconductor has the largest collection of .Rnw files not written by me ... so package checking there will probably soon put the code under test :-) Best, Fritz
• 945 views

Login before adding your answer.

Traffic: 382 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6