R haven

The haven package provides file I/O functions.


Installation

haven is commonly used through Tidyverse.


Usage

Data Format

Ingress Example

Outgress Example

SAS transport

read_xpt("data.xpt")

write_xpt(df, "data.xpt")

SAS binary

read_sas("data.sas7bdat")

N/A

SPSS

read_sav("data.sav")

write_sav(df, "data.sav")

Stata

read_dta("data.dta")

write_dta(df, "data.dta")


CategoryRicottone

R/Haven (last edited 2026-05-05 15:57:25 by DominicRicottone)