Learn R Programming

sjmisc (version 2.0.1)

read_sas: Import SAS dataset as data frame into R

Description

Imports data from SAS (.sas7bdat), including NA's, value and variable labels.

Usage

read_sas(path, path.cat = NULL, atomic.to.fac = FALSE, enc = NULL)

Arguments

path
File path to the data file.
path.cat
Optional, the file path to the SAS catalog file.
atomic.to.fac
Logical, if TRUE, categorical variables imported from the dataset (which are imported as atomic) will be converted to factors.
enc
The character encoding used for the file. This defaults to the encoding specified in the file, or UTF-8. Use this argument to override the default encoding stored in the file.

Value

A data frame containing the SAS data. Retrieve value labels with get_labels and variable labels with get_label.

See Also

read_spss