Skip to contents

Downloads and returns the variable dictionary for POF microdata. The dictionary is cached locally to avoid repeated downloads.

Usage

pof_dictionary(
  year = "2017-2018",
  register = NULL,
  cache_dir = NULL,
  refresh = FALSE
)

Arguments

year

Character. POF edition (e.g., "2017-2018"). Default is "2017-2018".

register

Character. Register name. If NULL, returns all registers. Default is 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.

Value

A tibble with variable definitions including: variable, description, position, length, decimals, register.

Examples

if (FALSE) { # interactive()
pof_dictionary("2017-2018", "morador", cache_dir = tempdir())
}