I just installed R on a new Microsoft Windows 7 computer and I am running in the following error when using command line:
"C:\Program Files\R\R-3.3.2\bin\Rscript.exe" --version
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.
Note that I have added above the quotes around the path with a space. And that I have added in the system path:
;C:\Program Files\R\R-3.3.2\bin\
Interestingly:
Rscript.exe --version
it gives the same error, which is very weird: if it finds it, why can't it run it!?! The only explanation I can find is that the error occurs when looking for a dependency of Rscript.exe
"C:\Program Files\R\R-3.3.3\bin\x64\Rscript.exe" --version
(both folders ...\bin
and ...\bin\x64
have an executable Rscript.exe)Finally I confirm it is an R specific question as all other executables I tried in a subfolder of Program Files can be called through the same command line interface!
I have been trying to replicate your issue and I found one thing in your question: You mention that this does not work:
"C:\Program Files\R\R-3.3.2\bin\Rscript.exe" --version
'C:\Program' is not recognized as an internal or external command,
But this does:
"C:\Program Files\R\R-3.3.3\bin\x64\Rscript.exe" --version
It seems that you are using R-3.3.3 in the example that works and R-3.3.2 in the example that does not.
So I would assume that if you change it to
"C:\Program Files\R\R-3.3.3\bin\Rscript.exe" --version
it should work.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With