This package provides a Stata-style webuse()
function for importing named datasets from Stata's online collection.
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")
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.