Commercial enterprise offerings Open source packages - Quarto, Shiny, and more

haven 1.1.0

Hadley Wickham Headshot
Written by Hadley Wickham
2017-07-13

Please note that the information presented in this post reflects the package as it stood when initially released, and may now be outdated. For the most up-to-date information, kindly refer to https://haven.tidyverse.org/.

I’m pleased to announce the release of haven 1.1.0. Haven is designed to faciliate the transfer of data between R and SAS, SPSS, and Stata. It makes it easy to read SAS, SPSS, and Stata file formats in to R data frames, and makes it easy to save your R data frames in to SPSS and Stata if you need to collaborate with others using closed source statistical software.

Install the latest version by running:

```{r}
install.packages("haven")
```

haven 1.1.0 is a small release that fixes a bunch of smaller issues. See the release notes for full details. The most important bug was ensuring that read_sav() once again correctly returns system defined missings as NA (rather than NaN). Other highlights include:

  • Preliminary support for reading and writing SAS transport files with read_xpt() and write_xpt().

  • An experimental cols_only argument in read_sas() that allows you to read only selected columns.

  • An update to the bundled ReadStat code, fixing many smaller reading and writing bugs.

  • Better checks in write_sav() and write_dta() making it more likely that you’ll get a clear error in R instead of producing an invalid file.

A big thanks goes to community members Evan Cortens and Patrick Kennedy who helped make this release possible with their code contributions.

Hadley Wickham Headshot

Hadley Wickham

Chief Scientist, Posit
Hadley is Chief Scientist at Posit PBC, winner of the 2019 COPSS award, and a member of the R Foundation. He builds tools (both computational and cognitive) to make data science easier, faster, and more fun. His work includes packages for data science (like the tidyverse, which includes ggplot2, dplyr, and tidyr)and principled software development (e.g. roxygen2, testthat, and pkgdown). He is also a writer, educator, and speaker promoting the use of R for data science.