Learn R Programming

nhanesA (version 1.3)

nhanesTableSummary: Summarize an NHANES table

Description

Computes a per-variable summary of a NHANES table either using the actual data or its corresponding codebook

Usage

nhanesTableSummary(nh_table, use = c("data", "codebook", "both"), ...)

Value

A data frame with one row per variable, with columns depending on the value of the use argument.

Arguments

nh_table

the name of a valid NHANES table

use

character string, whether to create a summary from the data itself or the codebook, which respectively use either the NHANES SAS data files or the HTML documentation files. If use = "both" then both are computed and merged; additional arguments (...) are ignored in this case.

...

additional arguments, usually passed on to either nhanes or nhanesCodebook as appropriate. Alternatively, the src argument can be used to pass on an already available data frame or codebook, but this must be consistent with the use argument.

Details

This function computes useful summaries of each variable included in the specified NHANES table. The resulting data frame contains one row for each variable in the table, and includes summary measures that indicate the total number of observations, the number of missing observations, whether the variable is most likely numeric or categorical, whether the variable is related to skipping other variables, etc. The precise details depend on the use argument and are subject to change.

Examples

Run this code
nhanesTableSummary('DEMO_D', use = "data")
nhanesTableSummary('DEMO_D', use = "codebook")

Run the code above in your browser using DataLab