read.sas7bdat: SAS Database Reader (experimental)

View source: R/sas7bdat.R

read.sas7bdatR Documentation

SAS Database Reader (experimental)

Description

Read SAS files in the sas7bdat data format.

Usage

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

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.

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)

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(s)

Matt Shotwell

References

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

Examples

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

sas7bdat documentation built on Sept. 11, 2024, 7:07 p.m.