Alicia Schep recently discovered an interesting fact about knitr: you can not only use other languages in R Markdown (Python, Julia, C++, Bash, SQL, and so on), but also actually have full control of how to run such code chunks. In other words, these “language engines” in knitr are fully customizable and extensible.
In her blog post, she expressed the surprise and joy:
That is exactly what I expect users to discover. This fact was not documented in great detail anywhere in public, unless you read the source code. The only full documentation was in the knitr book (Dynamic Documents with R and knitr), which is unfortunately not free. Good news is that this may change in this summer.
So thanks, Alicia. I started my day in a pleasant morning.
BTW, have I mentioned how awesome Nick Strayer and Lucy D’Agostino McGowan are?
- Update on 2018-03-02
Colin Fay is also awesome! Thanks!