RCurl默认代理设置

RCurl默认代理设置

本文介绍了RCurl默认代理设置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在代理后面工作,所以我需要配置我的连接。
它适用于定义选项列表和调用getURL:

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)


$ b b

我想将此选项设置为默认值,但仍然找不到任何工作解决方案。你能提出什么建议吗?

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

谢谢。

推荐答案

我很高兴发布问题。
解决方案真的在手,在RCurl常见问题页面。
有一个选项 RCurlOptions ,可以在R

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

但我还是有麻烦因为RGoogleAnalytics库似乎会覆盖此内容。

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")

这篇关于RCurl默认代理设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-22 21:20