RMarkdown in a restricted file write environment

I'm trying to use RMarkdown in a project on a restricted access Windows server. I've had no other problems with the project folder and can use RMarkdown elsewhere without problems, but I cannot knit my documents in this project. I assume this is related to the restricted nature of the server. However, I'm also able to use other document writing packages such as officer quite happily in this project.

Is there a way to change how RMarkdown operates? Given the nature of the question a minimal working example seems impossible!

I'm aware that I can save the RMarkdown document somewhere less restricted and direct it to the relevant data files, but I'm not comfortable with this workaround and want to keep everything within the project folder.

For information, when I try to knit the file I get this error message:

pandoc.exe: test.knit.md: openBinaryFile: does not exist (No such file or directory)
Error: pandoc document conversion failed with error 1
Execution halted

What are the restrictions ?

R Markdown will need to write in the folder where the R Markdown file is located.

I'm not entirely sure! Looking more closely at the Security settings for the project folder it looks like I have conflicting permissions, with 1 set of permissions differing only by removing the 'Full control' permissions. Realistically I'm unlikely to be able to get this clarified and changed (if necessary) any time soon.

I'm aware R Markdown will need to write to the folder, and this was why I tested creating a new document with the officer package, which worked without any problems. Similarly, I can save .png etc from code without any issues. Maybe there's there's an issue with the intermediate files created during the knitting or that the knitting process accesses files differently?

Are any files created during the knitting ?

Do you see any new file if you just knit ? using knitr::knit() or rmarkdown::render(run_pandoc = FALSE) to stop before pandoc conversion ?

A .md file should be created right next the .Rmd file.

Both of those worked fine. Does this suggest a Pandoc problem?

If you see the md file test.knit.md, then it is created.
So possibly pandoc does not have the correct right to read the md file. I don't know if this could happen.

You can try running pandoc yourself to see if that works. It will be located at

rmarkdown::find_pandoc()

if you want to find it

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.