Learn R Programming

sas7bdat (version 0.1)

read.sas7bdat: SAS Database Reader (experimental)

Description

Read SAS files in the sas7bdat data format.

Usage

read.sas7bdat(file)

Arguments

file
Path to a file or an URL.

Value

  • A data frame corresponding to the SAS database. The returned data frame has an column.info attribute, which contains additional information about each field in the data frame, respectively. The column.info attribute is a list of lists, containing zero or more of the following:
  • nameThe field name
  • labelThe field label (usually a longer description)
  • offsetThe field offset in packed binary row data (bytes)
  • lengthThe field length (bytes)
  • typeThe field type, either 'character' or 'numeric'

Warning

The functionality in this package is EXPERIMENTAL and may not work for all SAS databases having the extension sas7bdat! Use at your own risk. For more details, see the package vignettes.

References

http://biostatmatt.com/archives/tag/sas7bdat

Examples

Run this code
# read.sas7bdat("http://bus.utk.edu/stat/stat579/hotel.sas7bdat")

Run the code above in your browser using DataLab