2013-02-03 137 views
2

我想不出如何在Windows命令终端启动R。我运行cmd打开命令提示符后,我输入R,rcmd,start R并尝试其他可能性,我发现周围,但我有一个错误:'R' is not recognized as an internal or external command。我安装了R,并且在桌面上有一个快捷方式,我可以将它用作RGui,但是我看到人们以类似于命令行中的python的方式使用R.在Windows启动R命令终端

我有32位Windows 7

回答

9

如果它在你的路径类型:

R.exe 

为了得到它你的路径:

开始/电脑/系统属性/高级系统设置/环境变量/在下框选择路径/编辑

然后添加R的位置,我的是C:\R\R-2.15.1\bin,但可能默认情况下它在程序文件中。

这是我的变量值的样子:

C:\R\R-2.15.1\bin\i386;C:\Rtools\bin;C:\Rtools\perl\bin;C:\Rtools\gcc-4.6.3\bin;C:\Rtools\MinGW\bin;C:\R\bin;C:\Perl64\bin; C:\Program Files (x86)\MiKTeX 2.8\miktex\bin;C:\Program Files (x86)\HP SimplePass 2012\x64;C:\Program Files (x86)\HP SimplePass 2012\;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Common Files\Roxio Shared\DLLShared\;C:\Program Files (x86)\Common Files\Roxio Shared\DLLShared\;C:\Program Files (x86)\Common Files\Roxio Shared\12.0\DLLShared\;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files (x86)\Intel\Services\IPT\;C:\Program Files (x86)\Pandoc\bin;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\gs\gs9.06\bin;C:\Program Files (x86)\LibreOffice 3.5\URE\bin;C:\Program Files (x86)\MiKTeX 2.9\miktex\bin\; C:\Users\trinker\rubytools\bin 

然后单击确定三次。现在启动一个新的命令提示符,R.exe应该可以访问。