Learn R Programming

healthbR (version 0.2.0)

pof_variables: List POF variables

Description

Returns a list of available variables in the POF microdata with their labels. This is a convenience wrapper around pof_dictionary that returns a simplified view.

Usage

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

Value

A tibble with columns: variable, description, position, length, register.

Arguments

year

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

register

Character. Register name (e.g., "morador", "domicilio"). If NULL, returns variables from all registers. Default is NULL.

search

Character. Optional search term to filter variables by name or description. 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.

See Also

pof_dictionary, pof_data

Other pof: pof_cache_status(), pof_clear_cache(), pof_data(), pof_dictionary(), pof_info(), pof_registers(), pof_years()

Examples

Run this code
if (FALSE) { # interactive()
pof_variables("2017-2018", "morador", cache_dir = tempdir())
pof_variables("2017-2018", "domicilio", search = "ebia", cache_dir = tempdir())
}

Run the code above in your browser using DataLab