Downloads and returns the variable dictionary for PNADC microdata.
The dictionary is cached locally to avoid repeated downloads.
Usage
pnadc_dictionaries(module, year = NULL, cache_dir = NULL, refresh = FALSE)
Value
A tibble with variable definitions.
Arguments
module
Character. The module identifier (e.g., "deficiencia", "habitacao").
year
Numeric. Year to get dictionary for. Uses most recent year if NULL.
cache_dir
Character. Directory for caching downloaded files.
Default uses tools::R_user_dir("healthbR", "cache").
refresh
Logical. If TRUE, re-download even if file exists in cache.
Default is FALSE.
Data source
Dictionaries are downloaded from the IBGE FTP server.
Details
The dictionary includes variable names, positions, and widths from the
IBGE input specification file. This is useful for understanding the structure
of the data returned by pnadc_data.