get_url: Get CDC Documentation URL for NHANES Table

View source: R/data.R

get_urlR Documentation

Get CDC Documentation URL for NHANES Table

Description

Constructs and returns the full CDC documentation URL for a given NHANES table. The function handles table names with or without cycle suffixes (e.g., "DEMO_J" for 2017-2018 or "DEMO" for 1999-2000) and automatically maps the suffix to the appropriate survey cycle year.

Usage

get_url(table)

Arguments

table

Character. The table where variable information is needed. Can include cycle suffix (e.g., "DEMO_J") or not (e.g., "DEMO"). Not case-sensitive.

Value

Character string (invisibly). Full URL to CDC data documentation, codebook, and frequencies is returned invisibly and also printed to the console via message() for interactive use.

See Also

term_search, var_search

Other search and lookup functions: term_search(), var_search()

Examples

# These examples will run and display URLs
get_url("DEMO_J") # Demographics 2017-2018
get_url("diq_j") # Case-insensitive: Diabetes 2017-2018
get_url("DIQ") # No suffix = 1999-2000 cycle


nhanesdata documentation built on March 1, 2026, 1:06 a.m.