Can anyone point me to examples of using an R Markdown file sourced as a function? I can create a function with Openxlsx statements, for example, and use purrr to iterate through a list of tibbles, producing an Excel file with multiple worksheets. What I want is to produce multiple stand-alone PDFs of tables and graphs by iterating through the list of tibbles.
thought example:
map(LOT, source(R Markdown.rmd))
Or is there a better way to accomplish what I want?
I am trying to make sure I fully understand your question before suggesting the approach I would use. Are you wanting to be able to have some iterative process that feeds data/parameters to a .Rmd document so that the document renders specifically using those data?
If your question's been answered (even by you!), would you mind choosing a solution? It helps other people see which questions still need help, or find solutions if they have similar problems. Here’s how to do it: