Learn R Programming

haven (version 0.2.0)

read_sas: Read SAS files.

Description

This supports both b7dat files and the accompanying b7cat files that are SAS's equivalent of factor labels.

Usage

read_sas(b7dat, b7cat = NULL)

Arguments

b7dat,b7cat
Path to data and catalog files. If the path is a URL, the file will be first download to a temporary location before reading.

Value

A data frame with additional "tbl_df" and "tbl" classes, which improve printing if dplyr is loaded.Variable labels are stored in the "label" attribute of each variable. It is not printed on the console, but the RStudio viewer will show it.

Examples

Run this code
read_sas("http://crn.cancer.gov/resources/ctcodes-procedures.sas7bdat")

Run the code above in your browser using DataLab