← Back to all sparks
H

haven

ANALYTICS
Velocity0.0

Import and export SPSS, Stata and SAS data files from R

haven's release cadence has narrowed to compiler and R-devel upkeep.

rdata-importspss-stata-sasreadstatmaintenance
Current state
haven is the tidyverse's bridge to SPSS, Stata and SAS files, wrapping the C ReadStat library. The last several releases are almost entirely maintenance: syncing vendored ReadStat and patching ahead of R-devel changes. The most recent substantive user-facing work landed in 2.5.2 and earlier.
Where it's heading
Development has shifted from extending the file-format surface to keeping a C dependency compiling against newer toolchains. The deprecation of write_sas() narrowed that surface deliberately, steering users to write_xpt() because the sas7bdat format is undocumented and unsupported upstream.
Prediction
Expect further ReadStat sync releases triggered by compiler or R-devel breakage rather than new format support or writing features.

Recent moves

  1. 1y ago

    haven 2.5.5 syncs ReadStat for stricter gcc diagnostics

    A vendored ReadStat update to satisfy stricter gcc diagnostics. Pure toolchain upkeep with no user-visible change, and typical of where haven's effort now goes.

    View source ↗
  2. 2y ago

    haven 2.5.4 patches for an upcoming R-devel change

    A single forward-compatibility patch for an upcoming R-devel change. The second such release in a row, underlining that haven is in pure keep-it-compiling mode.

    View source ↗
  3. 3y ago

    haven 2.5.3 patches for an upcoming R-devel change

    Another R-devel forward-compatibility fix with no functional change for users reading or writing files.

    View source ↗
  4. 3y ago

    haven 2.5.2 fixes SAS catalog reads and deprecates write_sas()

    The last release with real substance: a ReadStat 1.1.9 bump that fixes a cluster of SAS catalog reading bugs and raises the maximum SAS page size to 16MiB. It also deprecates the experimental write_sas(), conceding that writing an undocumented format is not something haven can support.

    View source ↗
  5. 3y ago

    haven 2.5.1 aligns labelled headers and fixes name repair

    Presentation and API-consistency work: labelled vectors print with left-aligned headers in tibbles, and the write functions finally accept functions for .name_repair as the documentation already claimed. Small corrections to long-standing rough edges.

    View source ↗
  6. 4y ago

    haven 2.5.0 adds custom variable widths when writing files

    The most feature-dense release in this window, focused on file writing: custom variable widths via a width attribute, a minimum character width of 1 so other statistical software can read blank columns, and strL fallback in write_dta() for long strings.

    View source ↗