Import Stata 'webuse' Datasets

This package provides a Stata-style webuse() function for importing named datasets from Stata's online collection.

Package Installation

This package can be installed from R using install.packages("webuse") or from GitHub using remotes:

if(!require("remotes")){
    install.packages("remotes")
}
remotes::install_github("leeper/webuse")

Build Status CRAN Version Downloads

Code Examples

options(width = 100)

Functionality is simple. Load webuse and then access any online Stata dataset using the webuse() function. This will assign the named dataset to the .GlobalEnv (or another environment, if specified):

library("webuse")
webuse("auto")
head(auto)

webuse("uslifeexp")
head(uslifeexp)

The webuselist object contains a list of "core" Stata datasets:

str(webuselist)


leeper/webuse documentation built on May 21, 2019, 1:39 a.m.