Cannot knit RMD file - Pandoc error

Greetings all...I am having an issue trying to knit to any format from an .RMD file

It was previously recommended to me via Stack Overflow that I run RStudio as an Administrator which I have done. It worked for a while but no longer. Any help is appreciated.

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

Session Info:

R version 3.4.1 (2017-06-30)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252 LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C LC_TIME=English_United States.1252

attached base packages:
[1] stats graphics grDevices utils datasets methods base

loaded via a namespace (and not attached):
[1] compiler_3.4.1 backports_1.1.0 magrittr_1.5 rprojroot_1.2 htmltools_0.3.6 tools_3.4.1 yaml_2.1.14 Rcpp_0.12.12
[9] stringi_1.1.5 rmarkdown_1.6 knitr_1.17 stringr_1.2.0 digest_0.6.12 evaluate_0.10.1

What version of RStudio (not R) are you using?

Can you run the command yourself successfully? I.e. what happens when you do this in cmd.exe?

c:\> C:\PROGRA~1\RStudio\bin\pandoc\pandoc.exe --version

You might try reinstalling the latest RStudio, too.

I've been able to solve similar errors by moving the RMD file to a different location.

Version 1.0.153 of RStudio

And if I run the command suggested both as an administrator and not, I get Access is Denied. Certainly suggests an issue outside of RStudio.

Yes, it sounds like something's wrong with your Pandoc executable. I'd try (as admin) uninstalling RStudio, making sure that pandoc.exe is gone (and manually removing it if it's not), then reinstalling RStudio. If the issue persists, you could try installing your own copy of Pandoc and telling RStudio to use it. You can find more details on doing this here:

Harold - I've had the problem with files located all over so I don't think your success will be replicated for me. I do appreciate you responding though and I'll keep this in mind after I do the uninstall/reinstall that Jonathan suggested.

Not much help needed here, but I thought I'd post an update in case someone else has this issue - I apparently don't have rights on my laptop to uninstall RStudio (despite being in the admin group...) so there is obviously a much larger issue. I am not an IT admin by trade but I suspect some new group policy since this problem is recent.

:frowning: