R

The open-source language and environment for statistical computing

★ Starsn/aSubversion has no star count
Last commit19 Oct 2026
LicenceGPL-2.0Per the project
View source (SVN) ↗

From Subversion, fetched 19 Oct 2026.

R is a free language for statistics and graphics used across academia. Over 20,000 add-on packages on CRAN cover almost every statistical method, from mixed models to survival analysis, and it produces publication-quality plots.

Switching from SPSS

Your data: Install the haven package, then read_sav() loads your SPSS data into R with value labels and special missing values kept. write_sav() saves back to .sav.

  1. Install haven: In R, run install.packages("haven"), or install.packages("tidyverse") to get haven with the rest of the tidyverse.
  2. Load it: Run library(haven).
  3. Read your SPSS file: df <- read_sav("yourfile.sav") reads a .sav file. For older portable files, use read_por("yourfile.por").
  4. Work with value labels: Labelled values come in as haven's labelled() class, so the original labels aren't lost. Use as_factor() to turn them into factors. Special missing values are preserved.
  5. Save back to SPSS if you need to: write_sav(df, "out.sav") writes a .sav file that colleagues can open in SPSS.

Watch out for:

  • Dates and times are converted to R date/time classes, and character vectors are not converted to factors.
  • haven also reads Stata .dta (up to version 15) and SAS files, if you're moving from those too.

Full step-by-step guide →

Sources: haven.tidyverse.org, checked 19 Oct 2026.

Switching from Stata

Your data: Stata data files: .dta. R opens .dta, according to its own documentation.

  1. Keep your data from Stata as a .dta file.
  2. Open that file in R.

Watch out for:

  • With the haven package (part of the tidyverse): read_sav(), read_por(), read_sas(), read_xpt(), read_dta().

Sources: jasp-stats.org/faq · haven.tidyverse.org, checked 19 Oct 2026.

Switching from SAS

Your data: SAS data files: .sas7bdat, .sas7bcat, .xpt. R opens .sas7bdat and .xpt, according to its own documentation.

  1. Keep your data from SAS as .sas7bdat (with .sas7bcat for formats) or .xpt transport files.
  2. Open that file in R.

Watch out for:

  • With the haven package (part of the tidyverse): read_sav(), read_por(), read_sas(), read_xpt(), read_dta().

Sources: jasp-stats.org/faq · haven.tidyverse.org, checked 19 Oct 2026.

Fit for your research

Runs onWindows, macOS, Linux
Opens.sav, .por, .sas7bdat, .xpt, .dta
With the haven package (part of the tidyverse): read_sav(), read_por(), read_sas(), read_xpt(), read_dta().
Saves.sav, .xpt, .dta
With haven: write_sav(), write_xpt(), write_dta().

Sources: haven.tidyverse.org, checked 19 Oct 2026. “Runs on” is from this listing. Blank means we haven't found it in official docs yet, not that it's unsupported.

Switching guides

Free alternative to

In collections

Related tools

RStudio Desktop

Statistics

Popular open-source IDE for R and Quarto

Stars
★ 5.1k
Licence
AGPL-3.0
Updated

Alternative to SPSS, Stata

jamovi

Statistics

Spreadsheet-style statistics app built on R

Stars
★ 790
Licence
AGPL-3.0
Updated
  • Opens .sav
  • Opens .sas7bdat
  • Opens .dta

Alternative to SPSS, Stata

statsmodels

Statistics

Statistical models and tests for Python

Stars
★ 11.7k
Licence
BSD-3-Clause
Updated

Alternative to Stata, SAS

JASP

Statistics

Point-and-click statistics with classical and Bayesian tests

Stars
★ 1k
Licence
AGPL-3.0
Updated
  • Data stays local
  • Opens .sav
  • Opens .sas7bdat

Alternative to SPSS, GraphPad Prism

GNU PSPP

Statistics

Free program for statistical analysis of sampled data, modelled on SPSS

Licence
GPL-3.0
Updated
  • Opens .sav

Alternative to SPSS

G

gretl

Statistics

Econometrics package with a menu interface and scripting

Licence
GPL-3.0
Updated
  • Opens .dta
  • Opens .sav

Alternative to Stata