nhanesTableVars: Displays a list of variables in the specified NHANES table.

Description Usage Arguments Details Value Examples

View source: R/nhanes.R

Description

Enables quick display of table variables and their definitions.

Usage

1
2
nhanesTableVars(data_group, nh_table, details = FALSE, nchar = 100,
  namesonly = FALSE)

Arguments

data_group

The type of survey (DEMOGRAPHICS, DIETARY, EXAMINATION, LABORATORY, QUESTIONNAIRE). Abbreviated terms may also be used: (DEMO, DIET, EXAM, LAB, Q).

nh_table

The name of the specific table to retrieve.

details

If TRUE then all columns in the variable description are returned (default=FALSE).

nchar

The number of characters in the Variable Description to print. Values are limited to 0<=nchar<=128. This is used to enhance readability, cause variable descriptions can be very long.

namesonly

If TRUE then only the variable names are returned (default=FALSE).

Details

Data are retrieved via web scraping using html wrappers from package rvest. Each data table contains multiple, sometimes more than 100, fields. It is helpful to list the field descriptions to ascertain quickly if a data table is of interest.

Value

The names of the tables in the specified survey group

Examples

1
2
3
nhanesTableVars('LAB', 'CBC_E')
nhanesTableVars('EXAM', 'OHX_E', details=TRUE, nchar=50)
nhanesTableVars('DEMO', 'DEMO_F', namesonly = TRUE)

nhanesA documentation built on Oct. 17, 2018, 9:04 a.m.