Reputation: 9018
I am using render to produce a pdf:
rmarkdown::render("C://Users//myrmd.Rmd")
that works but when I add an output file and directory it does not work:
rmarkdown::render("C://Users//myrmd.Rmd",
output_file="C://...//myfolder//mypdf.pdf),
output_dir="C://.....//myfolder))
this returns an error Error: pandoc document conversion failed with error 43
Can you advise what the issue is here?
I have rmarkdown v1.8
Upvotes: 8
Views: 3791
Reputation: 6661
The output_file
is only for the name of the file. Not the path.
You also have too many parenthesis.
Try with:
rmarkdown::render(
"C:/Users/myrmd.Rmd",
output_file = "mypdf.pdf",
output_dir = "C:/...../myfolder"
)
Upvotes: 8