Hi all, I tried posting on Stack Overflow but no one seems to know how to resolve this. I've seen this Q a few times and no answers ever logged. Please help!
I can't seem to knit any markdown Rmd files to html or pdf. This happened all of a sudden and on Rmds I've used successfully for years. I tried downloading from repos, and the same problem exists. It seems to be on my computer but not on colleagues that download repos, so very strange. I updated yaml, rmarkdown, knitr packges, reinstalled new versions of Rstudio, R and still no solution.
When I try to knit, I get a prompt saying "Install Required Package: Rendering R Markdown documents requires and updated version of the rmarkdown pakage. Install now?". If I click no, everything halts. If I click yes, I get the following error immediately:
Fatal error: creating temporary file for '-e' failed
I have rmarkdown package v. 1.1 installed, and I uninstalled and reinstalled it, yet I still get this prompt. No clue what's happening or why this would start out of nowhere. I tried pulling from repo and running on a new computer and it will knit so it seems like it isn't in what is coded, but perhaps something loaded/not...? At a loss
The current version of rmarkdown is 1.16, so the first thing is to figure out why your setup is refusing to be well behaved.
It would help to know what platform you're using. The error sounds like a permissions problem. If you're on Windows, I may not be able to help, since I've pretty much been away since the mid-90s.
Warning in install.packages :
package āpandocā is not available (for R version 3.6.1)
I'm not sure if you were suggesting to load pandoc or if this is something that I should have loaded or not. Like I mentioned, things worked and then they didn't, and this was before I updated by R and R studio.
I went to the following link and downloaded pandoc for MacOS (Pandoc - Installing pandoc), shutdown R and reopened, but same error.
That look's suspiciously like it's there because of a setup using windows; and I seriously doubt that you have a directory of that name on Mojave!
Let's try getting rid of it. If that works, great! Then it wouldn't hurt to copy in the other lines.
cp .Renviron .Renviron.hold
then edit .Renviron using a plain text editor to remove that line.
The idea is that you can't write to a directory that doesn't exist. In the cases where it's a real directory, but you don't have write permissions, it would also give the same error you're experiencing.
Sorry @technocrat, you lost me. I can enter in command line
cp .Renviron .Renviron.hold
it takes the command, but I don't see how I'm supposed to edit the .Renvironment or where this is. I have no idea why this would have changed or how it would have been modified all of a sudden to give me this issue. Can you provide some more info on how I could make the changes you are suggesting?
Great. Please mark as a solution to help future pilgrims. (AFAIK no one here has ever bragged about numbers of solutions, so it ain't about me.) Glad you're back in operation!