Skip to main content

Posts

Showing posts from June, 2012

Salmon's Rules for Researcher/Bloggers

Felix Salmon had a nice piece the other day about the Jonah Lehrer self-plagiarism affair . (Basically a journalist, Jonah Lehrer, copied some things he had published elsewhere and posted them on his New Yorker blog .) Felix uses the controversy surrounding this event to write up four useful blogging rules for print journalists who also blog. I think these rules are probably also useful for academic researchers who also blog. To paraphrase Salmon’s rules: ‘‘Hey Look at This’’: Blogging is about reading rather than writing. Point others to something interesting you read. This can serve a very important function in academia, where without blogs and the like, most research is confined to low readership journals and conference presentations. Link, Do Not Repeat: Because any content on the internet is just a link away, you never have to repeat it. The need not to repeat frees researchers up to add onto others work. It also fits in well into an established culture of citing o

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: Error in function (type, msg, asError = TRUE) : SSL certificate problem, verify that the CA cert is OK. Details: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed 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). So, if you get the above error message just

Data on GitHub: The easy way to make your data available

Update (6 January 2012): See this post for information on the source_GitHubData function that makes downloading data from GitHub easier. Update (15 June 2012): See this post for instructions on how to download GitHub based data into R if you are getting the error about an SSL certificate problem . GitHub is designed for collaborating on coding projects. Nonetheless, it is also a potentially great resource for researchers to make their data publicly available. Specifically you can use it to: store data in the cloud for future use (for free), track changes , make data publicly available for replication, create a website to nicely present key information about the data, and uniquely: benefit from error checking by the research community. This is an example of a data set that I’ve put up on GitHub. How? Taking advantage of these things through GitHub is pretty easy. In this post I’m going to give a brief overview of how to set up a GitHub data repos

Slidify: Things are coming together fast

Tools for using R / RStudio as a one-stop shop for research and presentation have been coming out quickly. I think this one has a good shot of being included in future releases of RStudio : The other day I ran across a new R package called slidify by Ramnath Vaidyanathan . In previous posts I had been messing around with Pandoc and deck.rb to turn knitr Markdown files into HTML presentations. Slidify has two key advantages over these approaches: it can directly convert .Rnw files in R into slideshows, i.e. no toggling between R and the Terminal, there are lots of slideshow options ( deck.js , dzslides , html5slides , shower , and slidy ). It’s not on CRAN yet, but it worked pretty well for me. The syntax is simple. In the Markdown document demarcate new slides with --- (it has to be three dashes and there can’t be spaces after the dashes). When you want to convert your .Rnw into a presentation just type: library(slidify) slidify("presentation.Rnw&qu