Giter VIP home page Giter VIP logo

haven's Introduction

Haven

Travis-CI Build Status Coverage Status CRAN_Status_Badge

Haven allows you to load foreign data formats (SAS, SPSS and Stata) in to R by wrapping the fantastic ReadStat C library written by Evan Miller. Haven offers similar functionality to the base foreign package but:

  • It reads SPSS files (.dta and .por), reads Stata 13 and 14 files (foreign only works up to Stata 12), and SAS's proprietary binary format (SAS7BDAT + SAS7BCAT). It does not support many of the now more exotic formats supported by foreign.

  • Can also write SPSS, Stata, and SAS files.

  • Date times are converted to corresponding R classes and labelled vectors are returned as a new labelled class. You can easily coerce to factors or replace labelled values with missings as appropriate. All functions return tibbles.

  • Uses underscores instead of dots ;)

Haven is still a work in progress so please file an issue if it fails to correctly load a file that you're interested in.

Installation

# Install the released version from CRAN:
install.packages("haven")

# Install the cutting edge development version from GitHub:
# install.packages("devtools")
devtools::install_github("hadley/haven")

Usage

  • SAS: read_sas("path/to/file")
  • SPSS: read_sav("path/to/file")
  • Stata: read_dta("path/to/file")

haven's People

Contributors

hadley avatar evanmiller avatar gorcha avatar jeroen avatar lionel- avatar markriseley avatar edwindj avatar larmarange avatar aghaynes avatar krlmlr avatar bquast avatar ajdamico avatar diogocp avatar jjallaire avatar ehrlinger avatar kwenzig avatar biostatmatt avatar tklebel avatar

Stargazers

ajish avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.