Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

R Markdown: openBinaryFile: does not exist (No such file or directory)

Tags:

I've developed a shiny app that allows user to download a HTML report via R Markdown. I'm trying to include custom css and images into my rmarkdown file. However, I keep getting this error message:

pandoc: Could not fetch (either css or image file)
openBinaryFile: does not exist (No such file or directory)

When I knit the .rmd file on R Studio, it is able to reference the image file or css that I want. However, when I run the Shiny app and download the html file, I get the above error message. I've even tried to put the images and css files in the same working directory as the .rmd file, but to no avail...

output:
  html_document:
   css: pandoc.css

(same error message as above)

Been trying to find a solution for this but can't seem to...can anyone help here?

like image 605
ZPeh Avatar asked Jan 09 '18 03:01

ZPeh


1 Answers

I just had this issue as well, but for me the reason was that the RStudio project was on a shared drive, and I had opened it through the network location. The problem was resolved when I closed out of the project, and opened it back up through a mapped network drive. (If when you run getwd() your location starts with \\, this is probably what is happening to you.)

like image 158
AColeman Avatar answered Sep 18 '22 16:09

AColeman