This is a short blog post to mention that we turned our NHANES code into a package to make it easier for people to download the entire database and to pull in files for analyses. The code and details are on our GitHub repository.
Please see the earlier blog post on conducting some analyses using some functions from this package. Most of the information is either on the previous blog post, or on the GitHub repository referenced above. There is some additional functionality that we would like to add, so we won’t be putting it on CRAN for a while. In the meantime, it can be installed from GitHub using the devtools package, as described in the GitHub repository.
This package includes functions to download NHANES files from 1999 and later, and store them as .rds files in a data directory on the user’s computer. There are also some simple utilities to merge selected files into useable dataframes using the data.table package.