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

前端 未结 7 1117
轻奢々
轻奢々 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:37

    In the .bat file add a line of code specifying the path of the folder where R is installed and then give the path of the script as follows -

    @ECHO OFF
    PATH C:\Program Files\R\R-3.5.1\bin
    R CMD BATCH D:\project_abc\helloworld.R
    

    Following this, run the .bat file and you will see the code in the script will run smoothly.

提交回复
热议问题