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/