Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lebebr01/SPSStoR
R package to convert SPSS syntax to R code
https://github.com/lebebr01/SPSStoR
r spss
Last synced: 9 days ago
JSON representation
R package to convert SPSS syntax to R code
- Host: GitHub
- URL: https://github.com/lebebr01/SPSStoR
- Owner: lebebr01
- License: other
- Created: 2013-01-25T20:32:13.000Z (almost 12 years ago)
- Default Branch: main
- Last Pushed: 2021-01-18T17:06:19.000Z (almost 4 years ago)
- Last Synced: 2024-08-13T07:15:03.547Z (4 months ago)
- Topics: r, spss
- Language: R
- Size: 220 KB
- Stars: 62
- Watchers: 16
- Forks: 24
- Open Issues: 0
-
Metadata Files:
- Readme: README.Rmd
- License: LICENSE
Awesome Lists containing this project
- jimsghstars - lebebr01/SPSStoR - R package to convert SPSS syntax to R code (R)
README
## SPSS to R
[![Build Status](https://travis-ci.org/lebebr01/SPSStoR.svg?branch=master)](https://travis-ci.org/lebebr01/SPSStoR)
[![codecov.io](https://codecov.io/github/lebebr01/SPSStoR/coverage.svg?branch=master)](https://codecov.io/github/lebebr01/SPSStoR?branch=master)
A set of functions that takes *SPSS* syntax as input and outputs *R* commands
to do the same analysis or data management tasks.## Current Features
* Read in Data
* Get for sav files
* Get for csv, txt, xls, xlsx files with get data.
* Data Manipulation
* Sort Cases
* Descriptives
* Aggregate
* Correlations
* Crosstab
* Descriptives
* Frequencies
* Graphics
* Models
* One sample t-test
* Independent sample t-test
* One-way ANOVA - with oneway routine## Upcoming Features
* More Get commands to read in csv, txt, etc.
* Dataset commands
* Value Labels
* Further arguments for descriptives
* Modeling functions
+ t-test (two sample with cut score and paired)
+ analysis of variance - more complicated designs
+ regression
+ generalized models
* if else statements
* Examine## Installing Function
```{r install, eval = FALSE}
devtools::install_github("lebebr01/SPSStoR")
library(SPSStoR)
```## Examples
### Multiple commands
```{r multiple}
# Multiple commands in one
spss_to_r(system.file("SPSSsyntax", "getDescExamp.txt", package = "SPSStoR"))```
### Aggregate Example
```{r agg, warning = FALSE, message = FALSE}
spss_to_r(system.file("SPSSsyntax", "aggregateExamp.txt", package = "SPSStoR"))
```### Correlation Example
```{r corr, warning = FALSE, message = FALSE}
spss_to_r(system.file("SPSSsyntax", "correlationsExamp.txt", package = "SPSStoR"))
```### Crosstab Example
```{r crosstab, warning = FALSE, message = FALSE}
spss_to_r(system.file("SPSSsyntax", "crosstabExamp.txt", package = "SPSStoR"))
```### Sort Cases Example
```{r sortcase, warning = FALSE, message = FALSE}
spss_to_r(system.file("SPSSsyntax", "sortCasesExamp.txt", package = "SPSStoR"))
```### Descriptives Example
```{r desc, warning = FALSE, message = FALSE}
spss_to_r(system.file("SPSSsyntax", "descriptivesExamp.txt", package = "SPSStoR"))
```### t-test Examples
```{r ttest}
# t-test one-sample
spss_to_r(system.file("SPSSsyntax", "ttestOneSampExamp.txt", package = "SPSStoR"))
# Independent t-test example
spss_to_r(system.file("SPSSsyntax", "ttestTwoSampValExamp.txt", package = "SPSStoR"))
```### Get Command Example
```{r get}
spss_to_r(system.file("SPSSsyntax", "getExamp.txt", package = "SPSStoR"))
```### Graphics
```{r graphics}
spss_to_r(system.file("SPSSsyntax", "graphExamps.txt", package = "SPSStoR"))
```### Frequencies
```{r frequencies}
spss_to_r(system.file("SPSSsyntax", "frequenciesExamp.txt", package = "SPSStoR"))
```