R knitr doc for: http://www.win-vector.com/blog/2015/07/efficient-accumulation-in-r/ ‎