readstata13
Package to read the Stata 13 (and newer) file format into a R data.frame
Science Score: 36.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
✓Committers with academic emails
2 of 5 committers (40.0%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (15.8%) to scientific vocabulary
Keywords
rstats
stata
Keywords from Contributors
transformation
Last synced: 9 months ago
·
JSON representation
Repository
Package to read the Stata 13 (and newer) file format into a R data.frame
Basic Info
- Host: GitHub
- Owner: sjewo
- License: gpl-2.0
- Language: R
- Default Branch: main
- Homepage: https://sjewo.github.io/readstata13/
- Size: 2.35 MB
Statistics
- Stars: 41
- Watchers: 6
- Forks: 9
- Open Issues: 5
- Releases: 20
Topics
rstats
stata
Created almost 12 years ago
· Last pushed about 1 year ago
Metadata Files
Readme
Changelog
License
README.Rmd
---
title: "readstata13: Read and write the 'Stata' file format with R"
output:
github_document:
fig_width: 4
fig_height: 3.5
---
```{r, echo=FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-")
options(knitr.kable.NA = '')
```
[](https://cran.r-project.org/package=readstata13)
[](https://github.com/sjewo/readstata13/actions?workflow=R-CMD-check)
[](https://cran.r-project.org/package=readstata13)
Package to read and write all Stata file formats (version 17 and older) into a
R data.frame. The dta file format versions 102 to 121 are supported (including dtas files).
The function ```read.dta``` from the foreign package imports only dta files from
Stata versions <= 12. Due to the different structure and features of dta 117
files, we wrote a new file reader in Rcpp.
Additionally the package supports many features of the Stata dta format like
label sets in different languages (`?set.lang`) or business calendars
(`?as.caldays`).
## Installation
The package is hosted on CRAN.
```{r, eval = FALSE}
install.packages("readstata13")
```
## Usage
```{r, eval = FALSE}
library(readstata13)
dat <- read.dta13("path to file.dta")
save.dta13(dat, file="newfile.dta")
```
## Development Version
To install the current release from github you need the platform specific build
tools. On Windows a current installation of
[Rtools](https://cran.r-project.org/bin/windows/Rtools/) is necessary, while OS X
users need to install
[Xcode](https://apps.apple.com/us/app/xcode/id497799835).
```{r, eval = FALSE}
# install.packages("remotes")
remotes::install_github("sjewo/readstata13", ref="0.11")
```
To install the current development version from github:
```{r, eval = FALSE}
remotes::install_github("sjewo/readstata13", ref="testing")
```
## Changelog and Features
```{r, echo = FALSE}
news <- readLines("NEWS")
news_stop <- which(news == news[grepl("^\\[", news)][2]) - 2
news <- news[1:news_stop]
news_tab <- data.frame(Version = gsub("\\[|\\]", "", news[1]),
Changes = gsub("^- ", "", news[-1]))
news_tab[2:nrow(news_tab), "Version"] <- NA
knitr::kable(news_tab)
```
See [News](NEWS) for the full changelog.
```{r, echo = FALSE}
# create NEWS.MD for pagedown
news <- readLines("NEWS")
newsmd <- gsub("^\\[(.*)\\]", "## readstata13 \\1 \n", news)
cat(newsmd, file ="NEWS.md", sep = "\n")
```
## readstata13 and foreign
Most attributes of the resulting data.frame are largely similar to the data.frames produced by `foreign`.
Since newer Stata files require some additional attributes, the results of `all.equal()` and `identical()` will be `FALSE` for data.frames read by `foreign::read.dta` and `read.dta13()`.
Otherwise, the data.frames produced by both functions are identical.
```{r, eval = FALSE}
library(foreign)
library(readstata13)
# with factors
r12 <- read.dta("http://www.stata-press.com/data/r12/auto.dta")
r13 <- read.dta13("http://www.stata-press.com/data/r13/auto.dta")
all.equal(r12, r13, check.attributes = FALSE)
# without factors
r12 <- read.dta("http://www.stata-press.com/data/r12/auto.dta",
convert.factors = FALSE)
r13 <- read.dta13("http://www.stata-press.com/data/r13/auto.dta",
convert.factors = FALSE)
all.equal(r12, r13, check.attributes = FALSE)
```
## Authors
[Marvin Garbuszus](mailto:jan.garbuszus@ruhr-uni-bochum.de) ([JanMarvin](https://github.com/JanMarvin)) and [Sebastian Jeworutzki](mailto:Sebastian.Jeworutzki@ruhr-uni-bochum.de) ([sjewo](https://github.com/sjewo))
## Licence
GPL2
Owner
- Name: Sebastian Jeworutzki
- Login: sjewo
- Kind: user
- Location: Bochum
- Company: Ruhr-Universität Bochum
- Website: http://www.methoden.ruhr-uni-bochum.de/jeworutzki
- Repositories: 28
- Profile: https://github.com/sjewo
GitHub Events
Total
- Create event: 1
- Issues event: 1
- Release event: 1
- Delete event: 4
- Issue comment event: 6
- Push event: 41
- Pull request event: 8
Last Year
- Create event: 1
- Issues event: 1
- Release event: 1
- Delete event: 4
- Issue comment event: 6
- Push event: 41
- Pull request event: 8
Committers
Last synced: about 1 year ago
Top Committers
| Name | Commits | |
|---|---|---|
| Jan Marvin Garbuszus | j****s@r****e | 330 |
| Sebastian Jeworutzki | S****i@r****e | 275 |
| Giovanni Righi | g****i@u****u | 1 |
| Luke M. Olson | l****n@y****m | 1 |
| Brian Ripley | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 10 months ago
All Time
- Total issues: 46
- Total pull requests: 43
- Average time to close issues: 3 months
- Average time to close pull requests: about 1 month
- Total issue authors: 28
- Total pull request authors: 3
- Average comments per issue: 4.33
- Average comments per pull request: 0.56
- Merged pull requests: 37
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 1
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 1
- Pull request authors: 0
- Average comments per issue: 3.0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- JanMarvin (11)
- kendonB (4)
- benjamin-chan (2)
- Kevin-Jin (2)
- sjewo (2)
- yimingli (2)
- luisvalenzuelar (2)
- pbaylis (1)
- luke-m-olson (1)
- brook-milligan (1)
- ericmelse (1)
- skirmer (1)
- shv38339 (1)
- VioletteM (1)
- fyrebyrd3 (1)
Pull Request Authors
- JanMarvin (25)
- sjewo (24)
- grighi (1)
Top Labels
Issue Labels
enhancement (3)
bug (2)
question (1)
invalid (1)
wontfix (1)
Pull Request Labels
Packages
- Total packages: 2
-
Total downloads:
- cran 14,972 last-month
- Total docker downloads: 43,552
-
Total dependent packages: 7
(may contain duplicates) -
Total dependent repositories: 18
(may contain duplicates) - Total versions: 19
- Total maintainers: 1
cran.r-project.org: readstata13
Import 'Stata' Data Files
- Homepage: https://github.com/sjewo/readstata13
- Documentation: http://cran.r-project.org/web/packages/readstata13/readstata13.pdf
- License: GPL-2 | file LICENSE
-
Latest release: 0.11.0
published about 1 year ago
Rankings
Docker downloads count: 0.6%
Downloads: 2.9%
Average: 5.4%
Dependent repos count: 6.7%
Dependent packages count: 7.3%
Forks count: 7.3%
Stargazers count: 7.5%
Maintainers (1)
Last synced:
10 months ago
conda-forge.org: r-readstata13
- Homepage: https://github.com/sjewo/readstata13
- License: GPL-2.0-only
-
Latest release: 0.10.0
published about 5 years ago
Rankings
Dependent packages count: 28.8%
Dependent repos count: 34.0%
Average: 36.2%
Stargazers count: 38.6%
Forks count: 43.4%
Last synced:
10 months ago
Dependencies
DESCRIPTION
cran
- Rcpp >= 0.11.5 imports
- testthat * suggests
.github/workflows/R-CMD-check.yaml
actions
- actions/checkout v2 composite
- actions/upload-artifact main composite
- r-lib/actions/check-r-package v2 composite
- r-lib/actions/setup-pandoc v2 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/pkgdown.yaml
actions
- actions/checkout v2 composite
- r-lib/actions/setup-pandoc v2 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite