Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

Awesome Lists containing this project

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"))
```