3

I am trying to pull down data from Quandl using R. When I try to pull a data series down, I get this message:

Error in curl::curl_fetch_memory(url, handle = handle) : Couldn't connect to server

I have reviewed similar posts and apparently this is a proxy issue? I am trying to connect using a company computer.

How do I fix this?

Thanks.

Ahmad F
  • 30,560
  • 17
  • 97
  • 143
Jack
  • 31
  • 1

1 Answers1

1
opts <- list(
  proxy         = "999.999.999.999", 
  proxyusername = "mydomain\\myusername", 
  proxypassword = "mypassword", 
  proxyport     = 8080
)
getURL("http://stackoverflow.com", .opts = opts)

Original source: Proxy setting for R

There is also a Mac (and presumably Linux) version of the answer there. I would just leave this as a comment but we have multiple unanswered questions on this error so we need to get one with an answer and then dedupe the others.

When using a different function still include .opts = opts or use the other version of the solution in the linked post, which was

1) Open Terminal and do the following:

export http_proxy=http://staff-proxy.ul.ie:8080
export HTTP_PROXY=http://staff-proxy.ul.ie:8080

2) Run R and do the following:

Sys.setenv(http_proxy="http://staff-proxy.ul.ie:8080")
Community
  • 1
  • 1
Hack-R
  • 22,422
  • 14
  • 75
  • 131
  • Why not just close as a dupe? I can retract if you have a good reason not to. – IRTFM Nov 24 '16 at 21:40
  • @42 the others with this error message dont have any upvoted or accepted answers, but perhaps just redirecting in this way is good enough – Hack-R Nov 24 '16 at 21:51