Tyl*_*ker 5 windows r batch-file
我有很多人@工作,我想分享一些R脚本和其他各种好东西。这要求他们在其路径上启动并运行R实例和随附的Rtools。在路径中添加一些内容非常容易编写脚本,但是从Windows命令行安装R和Rtools却不可行(至少使用Google搜索“从Windows命令行安装R”效率不高)。
如何从Windows终端将R和RTools安装到C:\级别目录中(可以将其制作为.bat文件以进行可点击的分发)?
我必须学习一些 bash 但这个脚本似乎可以工作:
@echo off
If NOT exist "C:\R\R-3.3.0"\ (
bitsadmin /transfer mydownloadjob /download /priority normal ^
https://cran.r-project.org/bin/windows/base/R-3.3.0-win.exe C:\\Users\\%username%\Downloads\R-3.3.0-win.exe
C:\\Users\\%username%\Downloads\R-3.3.0-win.exe /VERYSILENT /DIR="C:\R\R-3.3.0"
)
If NOT exist "C:\Rtools\"\ (
bitsadmin /transfer mydownloadjob /download /priority normal ^
https://cran.r-project.org/bin/windows/Rtools/Rtools33.exe C:\\Users\\%username%\Downloads\Rtools33.exe
C:\\Users\\%username%\Downloads\Rtools33.exe /VERYSILENT /DIR="C:\Rtools\"
)
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1474 次 |
| 最近记录: |