Readstat

Jul 20, 2023

Read (and write) data sets from SAS, Stata, and SPSS

Originally developed for Wizard, ReadStat is a command-line tool and MIT-licensed C library for reading files from popular stats packages. Supported data formats include

  • SAS SAS7BDAT binary file and XPORT transport file
  • Stata DTA binary file versions 104-119
  • SPSS POR portable file, SAV binary file, and ZSAV compressed binary

Supported metadata formats include

  • SAS SAS7BCAT catalog file and .sas command file
  • Stata .dct dictionary file
  • SPSS .sps command file

There is also write support for all the data formats, but not the metadata formats. The produced SAS7BDAT files still cannot be read by SAS, but feel free to contribute your binary-format expertise here.



Checkout these related ports:
  • Zn_poly - C library for polynomial arithmetic
  • Zimpl - Language to translate the LP models into .lp or .mps
  • Zegrapher - Software for plotting mathematical objects
  • Zarray - Dynamically typed N-D expression system based on xtensor
  • Z3 - Z3 Theorem Prover
  • Yices - SMT solver
  • Yacas - Yet Another Computer Algebra System
  • Xtensor - Multi-dimensional arrays with broadcasting and lazy computing
  • Xtensor-python - Python bindings for xtensor
  • Xtensor-io - Xtensor plugin to read/write images, audio files, numpy npz and HDF5
  • Xtensor-blas - BLAS extension to xtensor
  • Xspread - Spreadsheet program for X and terminals
  • Xppaut - Graphical tool for solving differential equations, etc
  • Xplot - X11 plotting package
  • Xlife++ - XLiFE++ eXtended Library of Finite Elements in C++