R CMD on Windows 7 Error - “R” is not recognized as an internal or external command,

前端 未结 7 1036
轻奢々
轻奢々 2020-11-29 07:56

I\'m exploring package building on Windows 7 but have been running into trouble after reaching the Command Prompt stage. The following thread appears to be on the same topic

相关标签:
7条回答
  • 2020-11-29 08:57

    I had a lot of trouble getting this to work, and finally found the golden nugget on r-project (R doesn't like spaces in paths) so here's how I finally did all this:

    • I installed R to "c:\programs" instead of "c:\program files...". My final path to RSCRIPT.exe is "C:\Programs\R\R-2.15.2\bin\Rscript.exe"
      • I added that directory to my PATH, but that doesn't seem to help
      • RStudio is also installed under c:\Programs (e.g. c:\Programs\RStudio), but RTools is installed under the "c:\" root directory (e.g. c:\RTools).
    • I downloaded all the packages to "c:\downloads\r"
    • I opened a command prompt in "c:\downloads\r" and ran the R CMD install from this downloads directory, specifying the path to R
      • e.g. "C:\Programs\R\R-2.15.2\bin\x64\R CMD INSTALL colorspace_1.2-0.zip"
    0 讨论(0)
提交回复
热议问题