Downloads and parses NHANES manifests for public data (available at https://wwwn.cdc.gov/Nchs/Nhanes/search/DataPage.aspx), limited access data (https://wwwn.cdc.gov/Nchs/Nhanes/search/DataPage.aspx?Component=LimitedAccess), and variables (https://wwwn.cdc.gov/nchs/nhanes/search/variablelist.aspx?Component=Demographics, etc.), and returns them as data frames.
nhanesManifest(
which = c("public", "limitedaccess", "variables"),
sizes = FALSE,
dxa = FALSE,
verbose = getOption("verbose"),
use_cache = TRUE,
max_age = 24 * 60 * 60
)
A data frame, with columns that depend on
which
. For a manifest of tables, columns are "Table",
"DocURL", "DataURL", "Years", "Date.Published". If sizes =
TRUE
, an additional column "DataSize" giving the data file
sizes in bytes (as reported by the server) is included. For
limited access tables, the "DataURL" and "DataSize" columns are
omitted. For a manifest of variables, columns are "VarName",
"VarDesc", "Table", "TableDesc", "BeginYear", "EndYear",
"Component", and "UseConstraints".
Either "public" or "limitedaccess" to get a manifest of available tables, or "variables" to get a manifest of available variables.
Logical, whether to compute data file sizes (as reported by the server) and include them in the result.
Logical, whether to include information on DXA tables. These tables contain imputed imputed Dual Energy X-ray Absorptiometry measurements, and are listed separately, not in the main listing.
Logical flag indicating whether information on progress should be reported.
Logical flag indicating whether a cached version (from a previous download in the same session) should be used.
Maximum allowed age of the cache in seconds (defaults to 24 hours). Cached versions that are older are ignored, even if available.
manifest <- nhanesManifest(sizes = FALSE)
dim(manifest)
Run the code above in your browser using DataLab