I am trying to install rtools so that I can install another package (Google causalimpact), and the process indicated that I have a problem with my road environment for R.
Main problem
I can not start R from the cmd window.
The expected behavior should be displayed below and give a hint > :
R version 3.1.1 (blah blah) ... Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R.
However, the actual result:
'C:\Program' is not recognized as an internal or external command, operable program or batch file.
Additional Information
I can run Rcmd and Rgui (everything except R ) from cmd without errors.
Where R outputs the output C:\Program Files\R\R-3.1.1\bin\x64\R.exe
Where Rcmd outputs the output C:\Program Files\R\R-3.1.1\bin\x64\Rcmd.exe
Where Rgui outputs the output C:\Program Files\R\R-3.1.1\bin\x64\Rgui.exe
Return the same paths as their corresponding EXE files.
This is clearly a problem with my global environment paths, but I cannot understand why this will lead to this error.
The paths look like (path R in the last line):
c:\Rtools\bin c:\Rtools\gcc-4.6.3\bin C:\RBuildTools\3.1\bin C:\RBuildTools\3.1\gcc-4.6.3\bin c:\Rtools\bin c:\Rtools\gcc-4.6.3\bin C:\Python27\ C:\Python34\ C:\Python34\Scripts C:\Program Files (x86)\Intel\iCLS Client\ C:\Program Files\Intel\iCLS Client\ C:\windows\system32 C:\windows C:\windows\System32\Wbem C:\windows\System32\WindowsPowerShell\v1.0\ C:\Program Files (x86)\Intel\OpenCL SDK\3.0\bin\x86 C:\Program Files (x86)\Intel\OpenCL SDK\3.0\bin\x64 C:\Program Files\Intel\Intel(R) Management Engine Components\DAL C:\Program Files\Intel\Intel(R) Management Engine Components\IPT C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT C:\Program Files (x86)\QuickTime\QTSystem\ c:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\ c:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\ c:\Program Files\Microsoft SQL Server\100\Tools\Binn\ c:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn\ C:\strawberry\c\bin C:\strawberry\perl\site\bin C:\strawberry\perl\bin C:\Program Files\MiKTeX 2.9\miktex\bin\x64\ C:\Program Files\MiKTeX 2.9\miktex\bin\x64\ C:\Program Files\R\R-3.1.1\bin\x64
I can run Python and Perl by simply typing any name into the CMD window, and as shown in Figure R, I cannot understand the above error.
If anyone has suggestions on how I can fix this error, I would be very grateful.
I did not ask a question of this nature here before all the editorial / pointers were also highly praised.
Raw path:
PATH=C:\Program Files\R\R-3.1.1\bin\x64;C:\Program Files\R\R-3.1.1\bin\x64;c:\Rt ools\bin;c:\Rtools\gcc-4.6.3\bin;C:\RBuildTools\3.1\bin;C:\RBuildTools\3.1\gcc-4 .6.3\bin;c:\Rtools\bin;c:\Rtools\gcc-4.6.3\bin;C:\Python27\;C:\Python34\;C:\Pyth on34\Scripts;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iC LS Client\;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\Sy stem32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Intel\OpenCL SDK\3.0\bin\x 86;C:\Program Files (x86)\Intel\OpenCL SDK\3.0\bin\x64;C:\Program Files\Intel\In tel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Manageme nt Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Componen ts\IPT;C:\Program Files (x86)\QuickTime\QTSystem\;c:\Program Files (x86)\Microso ft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\;c:\Program Files (x86)\Microso ft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\Tools\Bi nn\;c:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn\;C:\strawberry\c\bi n;C:\strawberry\perl\site\bin;C:\strawberry\perl\bin;C:\Program Files\MiKTeX 2.9 \miktex\bin\x64\;C:\Program Files\MiKTeX 2.9\miktex\bin\x64\;C:\Users\Tariq.Muma n\AppData\Local\Pandoc\