Fetches the data file, its SAS program (which holds the column positions and
variable labels) and the codebook PDF, and keeps them in the nhanesR cache
(see nhanes_cache_dir()) so they are downloaded once. The exam file is about
195 MB, so the download timeout is raised to at least 15 minutes for these files.
Usage
nhanes3_download(file, what = c("sas", "dat", "codebook"), refresh = FALSE)Arguments
- file
A file name from
nhanes3_files():"exam","adult","youth","lab"or"lab2".- what
Which pieces to fetch:
"sas","dat"and/or"codebook". The default is all three.- refresh
Download again even if the file is already cached.
Details
The .sas file is small. It is enough for nhanes3_layout(), so you can look
through the variables before deciding to download the large .dat.