I'm new to the Quandl package for R and am trying to use it at work. Unfortunately, I'm forced to work behind the corporate firewall and have to connect to the internet via a proxy. I've been able to get around this before while using R to scrape the web or download files by just setting RCurlOptions with my proxy, port, and username/password. However, this isn't working for the Quandl package. It keeps giving me an error with the HTML of the page source, which is just McAfee saying the site has been blocked. I also tried set Quandl.curlopts using the list I created for RCurlOptions, but that didn't work either. It appears as if even though Quandl uses getURL(), it doesn't want to read the Curl options I've set before.
What is the problem and how do I fix it?
I figured out an answer to this. The Quandl
function makes a call to Quandl.api
which in turn references a curl object. The problem was that my curl options were set as a list and was not what Quandl was looking for. In order to fix this, I had to use the following code:
opts <- list(proxy = 'my proxy', proxyusername='domain\\username', proxypassword='mypassword', proxyport=####)
curl <- getCurlHandle(.opts = opts)
Quandl.curlopts(curl)
This allowed me to make calls to Quandl
with no errors.
Hope this helps anyone else with this problem!