statsmodels/statsmodels — pull request #561 by jseabold (2012-10-31 23:44:01+00:00)
Title: Grab rdatasets

Add a get_rdatasets function with optional caching capabilities. Caching is turned off by default. Not sure if we want to change this to turned on. Maybe save for once we have global configs set up?

I also used this to pull the data utils functions back into datasets like we wanted to do a long time ago. Just never had a reason.

Usage (It's not case-sensitive for the data. Don't know if this can lead to name clashing or even if the datasets in R are uniquely named across packages.):

```
import statsmodels.api as sm
duncan = sm.datasets.grab_rdataset("Duncan")

# save it to cache
stackloss = sm.datasets.grab_rdataset("stackloss", cache=True)

# load from cache
stackloss = sm.datasets.grab_rdataset("stackloss", cache=True)

longley = sm.datasets.grab_rdataset("longley")
```