Learn R Programming

healthbR (version 0.2.0)

pnadc_variables: List PNADC variables

Description

Returns a list of available variables in the PNADC microdata for a given module. This is a convenience wrapper around pnadc_dictionaries.

Usage

pnadc_variables(module, year = NULL, cache_dir = NULL, refresh = FALSE)

Value

A character vector of variable names.

Arguments

module

Character. The module identifier (e.g., "deficiencia", "habitacao").

year

Numeric. Year to get variables 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.

Examples

Run this code
if (FALSE) { # interactive()
# list variables for deficiencia module
pnadc_variables(module = "deficiencia", cache_dir = tempdir())
}

Run the code above in your browser using DataLab