As part of developing the slides for R for Biochemists, I have been using R Markdown. This allows the inclusion and the execution of scripts within a Markdown document.
I have prepared some the Markdown file on Github and the converted html file is there too.