I have an answer to your question, after a lot of searching around. When I noticed that R was changing the protocol of your DropBox URL from http
to https
, I became suspicious that you might have a certificate problem. As this SO post mentions, this seems to precisely be the case. Try using this code:
require(data.table)
require(httr)
cafile <- system.file("CurlSSL", "cacert.pem", package = "RCurl")
url = "http://www.dropbox.com/s/0brabdf53lc37i/data.csv?dl=1"
request <- GET(url, config(cainfo = cafile))
What is happening here:
The cert file cacert.pem
contains a list of trusted certificates, issued from a CA (Certificate Authority). When DropBox sends R its public SSL certificate, R will search through this list of trusted certificates to see if it can find it. If it can, it will allow the SSL handshake to complete, and your data will be downloaded.
The reason why you are having this problem but many who read your question do not have it, is that you likely never configured your curl settings in R.