RCurl default proxy settings

二次信任 提交于 2019-11-30 21:09:19

问题


I'm working here behind proxy so I need to configure my connection. It works well with defining options list and calling getURL:

opts <- list(
  proxy         = "http://****",
  proxyusername = "****", 
  proxypassword = "*****", 
  proxyport     = ****
)
getURL("http://stackoverflow.com", .opts = opts)

I'd like to set this options as defaults, but still cannot find any working solutions. Could you advise anything?

Thank you.


回答1:


I regret to hurry up posting question. The solution was really at the hand, at RCurl FAQ page. There is an option RCurlOptions which can be defined at the Rprofile.site file of R

But I'm still in trouble because RGoogleAnalytics library seems to overwrite this.

For completeness, here is the code:

opts <- list(
  proxy         = "http://****",
  proxyusername = "****", 
  proxypassword = "*****", 
  proxyport     = ****
)

options(RCurlOptions = opts)

getURL("http://stackoverflow.com")


来源:https://stackoverflow.com/questions/25120043/rcurl-default-proxy-settings

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!