Pages

15 June 2012

Update to Data on Github Post: Solution to an RCurl problem

A reader of my most recent post tried the R code I had written to download the data set of electoral disproportionality from the GitHub repository. However, it didn’t work for them. After entering disproportionality.data <- getURL(url) they got the error message:

The Solution

The problem seems to be that they didn’t have a certificate from an appropriate signing agent (see the RCurl FAQ page near the bottom) for more information. If you are really interested in SSL verification this page from redhat is a place to look).

The solution to this problem is pretty straightforward. As the RCurl FAQ page points out you can use the argument ssl.verifypeer = FALSE to skip certificate verification (effectively a man-in-the-middle attack).

A solution is provided at http://tonybreyal.wordpress.com/2011/11/24/source_https-sourcing-an-r-script-from-github/I adapted the script at https://github.com/bobthecat/codebox/blob/master/source_https.r