如何运行用.r扩展名编写的r程序?

问题描述:

我有一个文件有一些R程序代码,即progm.r,将它保存在我的桌面上:C:\Users\sandeeptiw\Desktop\progm.r如何运行用.r扩展名编写的r程序?

我已像变量路径:C:\Program Files\R\R-3.1.1\bin\

现在,我怎样才能运行这个程序?

+1

https://cran.rstudio.com/doc/manuals/r-release/R-intro.html#Invoking-R-from-the-command-line – hrbrmstr

+0

或类似的东西。 http://stackoverflow.com/questions/18306362/run-r-script-from-command-line/18306656#18306656 –

C:\Program Files\R\R-3.1.1\bin\Rscript.exe C:\Users\sandeeptiw\Desktop\progm.r

应排在你