Back to Browse

Generating Rmarkdown source with knit_expand (+ learn about iwalk/imap!)

1.0K views
Jan 14, 2022
17:56

A video about imap/iwalk, two other functions of the {purrr} package, combined with knitr::knit_expand() for template programming. This makes it possible to generate Rmarkdown source from a function, for example to create a document with 100's of pages of content (graphs, tables, etc) with a few lines of code! Code from the video: https://gist.github.com/b-rodrigues/9b29fea2f238c81146a36736d9e97c90 More documentation on knitr::knit_expand(): https://bookdown.org/yihui/rmarkdown-cookbook/knit-expand.html One blog post with a more complex example (mixing programming with {rlang}): https://www.brodrigues.co/blog/2021-12-17-expand_knitr/ Read my blog: https://www.brodrigues.co Want to discuss with me? Free chat: http://shinybrodriguesco.duckdns.org:3000/channel/brodrigues.co Buy me a coffee, my kids don't let me sleep: https://www.buymeacoffee.com/brodriguesco Learn R by reading my free ebook: https://b-rodrigues.github.io/modern_R/

Download

1 formats

Video Formats

360pmp428.9 MB

Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.

Generating Rmarkdown source with knit_expand (+ learn about iwalk/imap!) | NatokHD