Skip to main content


Showing posts from January, 2013

repmis: misc. tools for reproducible research in R

I've started to put together an R package called repmis. It has miscellaneous tools for reproducible research with R. The idea behind the package is to collate commands that simplify some of the common R code used within knitr-type reproducible research papers.It's still very much in the early stages of development and has two commands:LoadandCite: a command to load all of the R packages used in a paper and create a BibTeX file containing citation information for them. It can also install the packages if they are on CRAN.source_GitHubData: a command for downloading plain-text formatted data stored on GitHub or at any other secure (https) URL.I've written about why you might want to use source_GitHubData before (see here and here).You can use LoadandCite in a code chunk near the beginning of a knitr reproducible research document to load all of the R packages you will use in the document and automatically generate a BibTeX file you can draw on to cite them. Here's an ex…

source_GitHubData: a simple function for downloading data from GitHub into R

Update 31 January: I've folded source_GitHubData into the repmis packaged. See this post. Update 7 January 2012: I updated the internal workings of source_GitHubData so that it now relies on httr rather than RCurl. Also it is more directly descended from devtool's source_url command. This has two advantages. Shortened URL's can be used instead of the data sets' full GitHub URL,The ssl.verifypeer issue is resolved. (Though please let me know if you have problems). The post has been rewritten to reflect these changes.In previousposts I've discussed how to download data stored in plain-text data files (e.g. CSV, TSV) on GitHub directly into R.Not sure why it took me so long to get around to this, but I've finally created a little function that simplifies the process of downloading plain-text data from GitHub. It's called source_GitHubData. (The name mimicks the devtools syntax for functions like source_gist and source_url. The function's syntax is actual…