I have the R package, one of its function - produce report. In the inst/markdown I have a template rep.rmd. In the package function ProduceReport() I have this code:
render.file <-"rep.Rmd"
render.file <- system.file(TEMPLATES.PATH, render.file, package=getPackageName())
render.dir <- dirname(render.file)
pdf.file <- "example.pdf"
rmarkdown::render(render.file , quiet = FALSE, output_format = "pdf_document")
It works, but during the execution markdown produces directories temp files
rep_cache, rep_files
I would like to test this report generating function in parallel (when .rmd files run with different inputs and produce different reports). My first question, is it possible to run same .rmd file with different inputs in parallel?
I guess that temp directories should have unique names to avoid writing to the same files. I found arguments
intermediates_dir = , knit_root_dir =
in the rmarkdown::render() function. But when I try to define this parameters with created dir, pandoc produces errors (and rep_cache, rep_files directories are still in their places).
Please, any advice.