hackmdio / codimd

CodiMD - Realtime collaborative markdown notes on all platforms.
https://hackmd.io/c/codimd-documentation
GNU Affero General Public License v3.0
9.34k stars 1.06k forks source link

feature request: knitr support #468

Open zeigerpuppy opened 7 years ago

zeigerpuppy commented 7 years ago

It would be great to have inline support for R code via knitr chunks. perhaps this could be offloaded to a user-specific R server

ccoenen commented 7 years ago

I am not familiar with knitr and have only very superficial knowledge of R. Could you explain a little more about what knitr does or what you're trying to do?

zeigerpuppy commented 7 years ago

knitr (https://yihui.name/knitr/demos/ ) is a library which allows processing of R code chunks. These can be quite useful for output of figures, statistics and data manipulation.

R has become the de-facto standard for open-source statistical software and has thousands of R libraries including some great ones for making graphs (e.g. DiagrammeR http://rich-iannone.github.io/DiagrammeR/graphviz_and_mermaid.html and ggplot2 http://www.r-graph-gallery.com/portfolio/ggplot2-package/ ). With knitr chunks R can be easily integrated into markdown documents as everything is handled by the library and the output is plain text or image files.

Here's a couple of introductions to it:

https://www.r-bloggers.com/r-markdown-and-knitr-tutorial-part-1/ https://sachsmc.github.io/knit-git-markr-guide/knitr/knit.html