Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/leeper/webuse
Import Stata 'webuse' Datasets
https://github.com/leeper/webuse
cran data-import dataset r stata stata-datasets
Last synced: 2 months ago
JSON representation
Import Stata 'webuse' Datasets
- Host: GitHub
- URL: https://github.com/leeper/webuse
- Owner: leeper
- License: other
- Created: 2015-06-17T12:17:58.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2018-09-30T22:49:12.000Z (about 6 years ago)
- Last Synced: 2024-06-11T18:12:49.226Z (6 months ago)
- Topics: cran, data-import, dataset, r, stata, stata-datasets
- Language: R
- Homepage: https://cloud.r-project.org/package=webuse
- Size: 37.1 KB
- Stars: 6
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.Rmd
- License: LICENSE
Awesome Lists containing this project
README
# 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**:
```R
if(!require("remotes")){
install.packages("remotes")
}
remotes::install_github("leeper/webuse")
```[![Build Status](https://travis-ci.org/leeper/webuse.svg?branch=master)](https://travis-ci.org/leeper/webuse)
[![CRAN Version](http://www.r-pkg.org/badges/version/webuse)](http://cran.r-project.org/package=webuse)
![Downloads](http://cranlogs.r-pkg.org/badges/webuse)## Code Examples
```{r, echo=FALSE, results='hide'}
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):
```{r}
library("webuse")
webuse("auto")
head(auto)webuse("uslifeexp")
head(uslifeexp)
```The `webuselist` object contains a list of "core" Stata datasets:
```{r}
str(webuselist)
```