Blog Archives

Updates to repmis: caching downloaded data and Excel data downloading

May 11, 2014
By

Over the past few months I’ve added a few improvements to the repmis–miscellaneous functions for reproducible research–R package. I just want to briefly highlight two of them: Caching downloaded data sets. source_XlsxData for downloading data in Excel formatted files. Both of these capabilities are in repmis version 0.2.9 and greater. Caching When working with data sourced directly from the internet, it can be...

Read more »

d3Network Plays Nice with Shiny Web Apps

May 9, 2014
By
d3Network Plays Nice with Shiny Web Apps

After some delay (and because of helpful prompting by Giles Heywood and code contributions by John Harrison) d3Network now plays nicely with Shiny web apps. This means you can fully integrate R/D3.js network graphs into your web apps. Here is what one ...

Read more »

Programmatically download political science data with the psData package

February 23, 2014
By

A lot of progress has been made on improving political scientists’ ability to access data ‘programmatically’, e.g. data can be downloaded with source code R. Packages such as WDI for World Bank Development Indicator and dvn for many data sets stored on the Dataverse Network make it much easier for political scientists to use this data...

Read more »

Three Quick and Simple Data Cleaning Helper Functions (December 2013)

December 6, 2013
By

As I go about cleaning and merging data sets with R I often end up creating and using simple functions over and over. When this happens, I stick them in the DataCombine package. This makes it easier for me to remember how to do an operation and others can possibly benefit from simplified and (hopefully) more intuitive code....

Read more »

Showing results from Cox Proportional Hazard Models in R with simPH

September 2, 2013
By
Showing results from Cox Proportional Hazard Models in R with simPH

Effectively showing estimates and uncertainty from Cox Proportional Hazard (PH) models, especially for interactive and non-linear effects, can be challenging with currently available software. So, researchers often just simply display a results table. These are pretty useless for Cox PH models. It is difficult to decipher a simple linear variable’s estimated effect and basically impossible to understand time...

Read more »

GitHub renders CSV in the browser, becomes even better for social data set creation

August 22, 2013
By
GitHub renders CSV in the browser, becomes even better for social data set creation

I've written in a number of places about how GitHub can be a great place to store data. Unlike basically all other web data storage sites (many of which I really like such as Dataverse and FigShare) GitHub enables deep social data set development and f...

Read more »

Getting Started with Reproducible Research: A chapter from my new book

July 15, 2013
By
Getting Started with Reproducible Research: A chapter from my new book

(This article was first published on Christopher Gandrud (간드루드 크리스토파), and kindly contributed to R-bloggers) This is an abridged excerpt from Chapter 2 of my new book Reproducible Research with R and RStudio. It's published by Chapman & Hall/CRC Press. You can purchase it on Amazon. "Search inside this book" includes a complete table of contents. Researchers often start...

Read more »

Quick and Simple D3 Network Graphs from R

June 8, 2013
By
Quick and Simple D3 Network Graphs from R

Sometimes I just want to quickly make a simple D3 JavaScript directed network graph with data in R. Because D3 network graphs can be manipulated in the browser–i.e. nodes can be moved around and highlighted–they're really nice for data exploration. They're also really nice in HTML presentations. So I put together a...

Read more »

Slide: one function for lag/lead variables in data frames, including time-series cross-sectional data

May 21, 2013
By

I often want to quickly create a lag or lead variable in an R data frame. Sometimes I also want to create the lag or lead variable for different groups in a data frame, for example, if I want to lag GDP for each country in a data frame. I've found the various R methods for doing this hard...

Read more »

Reinhart & Rogoff: Everyone makes coding mistakes, we need to make it easy to find them + Graphing uncertainty

April 17, 2013
By
Reinhart & Rogoff: Everyone makes coding mistakes, we need to make it easy to find them + Graphing uncertainty

You may have already seen a lot written on the replication of Reinhart & Rogoff’s (R &amp R) much cited 2010 paper done by Herndon, Ash, and Pollin. If you haven’t, here is a round up of some of some of what has been written: Konczal, Yglesias, Krugman, Cowen, Peng,

Read more »