dependency chain too long which slows down the package loading
Loading required package: knitr
user system elapsed
0.688 0.016 0.705
in the future we probably will not need highlighting on R's side; markdown + js should work well
Although, using js to syntax highlight code seems to be a cleaner solution, none of the currently popular js highlighters solutions including google prettify seem to have satisfactory lexers to parse R code. I have created a workaround, where I fool knitr into thinking that the document's output format is html and also to render any executed code in html. I then pass this pseudo markdown document to markdown which works. I will put it up as a gist, once I clean my code.
Meanwhile, if you are aware of js highlighters that do a reasonably good job of highlighting R code, please let me know.
I take that back. A little digging revealed that the RStudio folks have contributed an R syntax highlighter to highlight.js. It is available only in the development version on github. I downloaded it and played with a few themes, and it seems to work really well. The only drawback is that the CDN hosted version of highlight.js does not include R, so it will have to be self-hosted.
hmm, it seems they release a new version roughly biannually; web products should be updated much more frequently, I think
update manual: highlight is no longer required; closes #211