nhanes: Download an NHANES table and return as a data frame.

View source: R/nhanes.R

nhanesR Documentation

Download an NHANES table and return as a data frame.

Description

Use to download NHANES data tables that are in SAS format.

Usage

nhanes(nh_table, includelabels = FALSE)

Arguments

nh_table

The name of the specific table to retrieve.

includelabels

If TRUE, then include SAS labels as variable attribute (default = FALSE).

Details

Downloads a table from the NHANES website as is, i.e. in its entirety with no modification or cleansing. NHANES tables are stored in SAS '.XPT' format but are imported as a data frame. Function nhanes cannot be used to import limited access data.

Value

The table is returned as a data frame.

Examples

nhanes('BPX_E')
nhanes('FOLATE_F', includelabels = TRUE)

nhanesA documentation built on July 26, 2023, 5:41 p.m.