I'm writing a tutorial on using the R language to do some applied statistics. An example post is:
http://mcmcinirt.stat.cmu.edu/archives/223
I would like to have all of the blocks of source code be loaded from local files on the webserver. In that way, I could use git to sync them with the files that I'm actually using to develop the examples.
As it stands, I write the code on my machine, generate the graphs / check that it works, and then copy the final code into the text of the blog. This leads to duplication headaches.
Is it possible to avoid this kind of code duplication? (Either in the way I suggest or perhaps a more WordPress friendly way?)