2016-02-08 130 views
0

我有一個腳本,當前使用單一登錄(SSO)基礎結構從下載鏈接下載文件。目前我正在使用curl批處理腳本下載它。我怎樣才能讓equalivent所有R中下載的文件如何使用R從下載鏈接下載文件

curl negotiate -u user:pass -L --insecure -o DownloadFileName.xml "https://Server/Servlet?param1=value1" 
+1

你可以使用'系統()'爲[打電話給你的系統調用] (http://stackoverflow.com/questions/5745886/r-and-system-calls),或嘗試['?download.file()'](http://www.inside-r.org/r-doc) /utils/download.file) – tospig

+0

@tospig答案奏效 – user1605665

回答

0

由於@tospig建議使用system()像這樣:

system("curl negotiate -u user:pass -L --insecure -o DownloadFileName.xml \"https://Server/Servlet?param1=value1\"")