yihui/knitr — Issue #93: reversible knitting
Author: baptiste
Created: 2012-01-20 22:35:48+00:00
State: open

I've been contemplating a project of integrating an online wiki, such as that provided by github or googlecode, with an R package. The idea would be to have:

- a ./inst/wiki directory in the package, containing some form of noweb source files mixing R code with a lightweight markup, say GFM.

- upon R CMD check, or some other operation, the files are knit, producing figures etc.

- a function uploads the updated files to the online wiki.

Thus, the online wiki contains reproducible examples, and the package documentation can be improved/extended by a number of casual users online.

One major hurdle here is the reverse process: suppose a user modifies the wiki page _online_; how do we synchronize the changes with the local version? It is easy to synchronise the output file, but how does one extract the changes and apply them to the original noweb source file?

I imagine this might involve adding the name of the original code chunks as comments in the output files.

Any thoughts on this framework?