←back to thread

Big Book of R

(www.bigbookofr.com)
288 points sebg | 2 comments | | HN request time: 0.62s | source
Show context
thangalin ◴[] No.43646979[source]
Tangentially, R can help produce living Markdown documents (.Rmd files). A couple of ways include pandoc with knitr[0] or my FOSS text editor, KeenWrite[1]. I've kept the R syntax in KeenWrite compatible with knitr. Living documents as part of a build process can produce PDFs that are always up-to-date with respect to external data sources[2], which includes source code.

[0]: https://yihui.org/knitr/

[1]: https://keenwrite.com/

[2]: https://youtu.be/XSbTF3E5p7Q?list=PLB-WIt1cZYLm1MMx2FBG9KWzP...

replies(2): >>43647139 #>>43647376 #
1. juujian ◴[] No.43647139[source]
Last time I was working on something complex, I was able to knit from Rmd to md, and then use my usual pandoc defaults, which was quite neat. Big recommendation on that workflow.
replies(1): >>43651211 #
2. thangalin ◴[] No.43651211[source]
My typesetting Markdown series explores weaving knitr and pandoc together:

https://dave.autonoma.ca/blog/2019/07/11/typesetting-markdow...

However, most workflows and nearly all editors don't support interpolated variables. To address this, first I developed a YAML preprocessor:

https://repo.autonoma.ca/yamlp.git

Then I grew tired of editing YAML files, piping files together, and maintaining bash scripts. So next, I developed KeenWrite to allow use of interpolated variables directly within documents from a single program. The screenshots show how it works:

https://keenwrite.com/screenshots.html