Learn R Programming

sas7bdat (version 0.8)

read.sas7bdat: SAS Database Reader (experimental)

Description

Read SAS files in the sas7bdat data format.

Usage

read.sas7bdat(file, encoding="", debug=FALSE)

Value

A data frame corresponding to the SAS database. The returned data frame has an column.info attribute and other attributes that contain additional information about each field in the data frame, respectively. The column.info attribute is a list of lists, containing each of the following:

name

The field name

offset

The field offset in packed binary row data (bytes)

length

The field length (bytes)

type

The field type, either 'character' or 'numeric'

When the database specifies a field format and/or label, the following may also be present:

format

The field display format

label

The field label (usually a longer description)

Arguments

file

character: Path to a file or an URL.

encoding

character: Character encoding for strings

debug

logical: Save function environment as attribute of returned object.

Warning

The functionality in this package is EXPERIMENTAL. Use at your own risk. For the latest details, see the ‘sas7bdat’ vignette (i.e., vignette('sas7bdat')).

Author

Matt Shotwell

References

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

Examples

Run this code
## see \code{data(sas7bdat.sources)}

Run the code above in your browser using DataLab