nhanesR: Download, Parse, and Analyze NHANES Data with Mortality Linkage

Provides tools for downloading and organizing National Health and Nutrition Examination Survey (NHANES) public-use data files and the National Center for Health Statistics (NCHS) Public-Use Linked Mortality Files (LMF). Supports structured local caching, codebook access, survey-aware merging, and preparation of survival analysis datasets using NHANES-National Death Index (NDI) linked mortality data (follow-up through December 31, 2019). NHANES methodology is described at <https://wwwn.cdc.gov/nchs/nhanes/Default.aspx>.

Version: 0.1.5
Depends: R (≥ 4.1.0)
Imports: httr2 (≥ 1.0.0), haven (≥ 2.5.0), readr (≥ 2.1.0), rlang (≥ 1.1.0), cli (≥ 3.6.0), tools
Suggests: foreign, survey, survival, rvest, Hmisc, testthat (≥ 3.0.0), knitr, rmarkdown
Published: 2026-07-17
DOI: 10.32614/CRAN.package.nhanesR (may not be active yet)
Author: David Winsemius [aut, cre]
Maintainer: David Winsemius <dwinsemius at comcast.net>
BugReports: https://github.com/dwinsemius/nhanesR/issues
License: MIT + file LICENSE
URL: https://dwinsemius.github.io/nhanesR/, https://github.com/dwinsemius/nhanesR
NeedsCompilation: no
Language: en-US
Materials: README, NEWS
CRAN checks: nhanesR results

Documentation:

Reference manual: nhanesR.html , nhanesR.pdf
Vignettes: Navigating Variable Name Changes and Analyte Gaps in NHANES (source, R code)
NHANES Mortality Linkage: A Complete Workflow (source, R code)
Getting Started with nhanesR (source, R code)
Survey-Weighted Survival Analysis: Fusing svycoxph and rms (source, R code)
Urinary Albumin-to-Creatinine Ratio Across NHANES Cycles (source, R code)

Downloads:

Package source: nhanesR_0.1.5.tar.gz
Windows binaries: r-devel: not available, r-release: not available, r-oldrel: not available
macOS binaries: r-release (arm64): nhanesR_0.1.5.tgz, r-oldrel (arm64): nhanesR_0.1.5.tgz, r-release (x86_64): nhanesR_0.1.5.tgz, r-oldrel (x86_64): nhanesR_0.1.5.tgz

Linking:

Please use the canonical form https://CRAN.R-project.org/package=nhanesR to link to this page.