Skip to contents

Retrieves summary data for a single organizational unit by its SIORG code. Returns a single-row tibble with the unit's details.

Usage

get_siorg_unidade(codigo_unidade, use_cache = TRUE, verbose = FALSE)

get_siorg_unit(unit_code, use_cache = TRUE, verbose = FALSE)

Arguments

codigo_unidade

Integer or character. SIORG code. Required.

use_cache

Logical. If TRUE (default), uses an in-memory cache.

verbose

Logical. If TRUE, prints the full API URL. Defaults to getOption("tesouror.verbose", FALSE).

unit_code

Integer or character. SIORG code. Maps to codigo_unidade.

Value

A tibble (single row) with unit details including codigo_unidade, nome, sigla, codigo_tipo_unidade, codigo_unidade_pai, codigo_natureza_juridica, and more.

Details

get_siorg_unit() is an English alias.

See also

Examples

if (FALSE) { # \dontrun{
# Get details for AGU (code 46)
agu <- get_siorg_unidade(codigo_unidade = 46)
} # }