I am trying to knit an Rmd file in R Studio on a Windows 7 box. Honestly, at this point, I'm just trying to get the default Rmd file to knit.
Whether I try to output to html or pdf, I get the following error:
Error in system(paste(shQuote(pandoc_path), "--version"), intern = TRUE) :
'CreateProcess' failed to run 'C:\PROGRA~1\RStudio\bin\pandoc\pandoc.exe --version'
Calls: ... get_pandoc_version -> with_pandoc_safe_environment -> force -> system
Execution halted
The same error results whether I use the nice UI "knit" button or a direct render()
command.
Fearing that I was out of date, I have uninstalled and reinstalled both R and RStudio, so they're now at R version 3.3.2 and RStudio version 1.0.136. The first time I created an Rmd file after the reinstallation, it asked about installing updated version of various packages. Did that without incident, but it didn't resolve the problem.
I've tried to explicitly load the library, which informs me that there is no such package. If I try to install the package, I get the following message:
Warning in install.packages :
package ‘pandoc’ is not available (for R version 3.3.2)
The instructor pointed me to Cannot launch pandoc in rstudio. (Nothing about the package not being available, so maybe that isn't important?) Following those instructions, I've checked for a duplicate pandoc
installation (both manually checking Userdata/Apps/local and a search for "pandoc" anywhere on the computer). The only pandoc
is in the RStudio bin, so I don't think that's the issue.
I have also tried the two suggestions included in Knitr pandoc Execution halted in R -- namely installing MiKTeX, then installing/loading pandoc manually as outlined (along with ensuring full control permissions). Neither fixed the problem. (Of course, when I loaded pandoc manually, it created a duplicative pandoc
in the system. I therefore uninstalled that.)
Any ideas???
Many thanks!