knitr::opts_knit$set(root.dir = rprojroot::find_rstudio_root_file()) # Set WD to Root
here::i_am("dev/pandoc.Rmd")
library(rmarkdown)
library(here)

Render a pandoc template.

Ref

tmp <- pandoc_template(metadata = list(place = "World"), 
                template = here("dev/test_data/temp.txt"),
                output = here("dev/test_data/out.txt"))

tmp
rm(tmp)

Output path is not vectorized, this will error

pandoc_template(metadata = list(place = "World"), 
                template = here("dev/test_data/temp.txt"),
                output = c(here("dev/test_data/out1.txt"), here("dev/test_data/out1.txt"))
)


Lightbridge-KS/thaipdf documentation built on June 18, 2022, 6:58 a.m.