Дмитро Булах
Дмитро Булах

Reputation: 3847

RCurl default proxy settings

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.

Upvotes: 1

Views: 5654

Answers (1)

Дмитро Булах
Дмитро Булах

Reputation: 3847

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

Upvotes: 5

Related Questions