datasus_opcoes: Inspect the options of a DATASUS query

View source: R/health-services.R

datasus_opcoesR Documentation

Inspect the options of a DATASUS query

Description

Reads the current TABNET form and returns its row, column, measure, period and filter choices. Filter names in the returned 'filtros' list are the names accepted by the query functions.

Usage

datasus_opcoes(sistema, conjunto = NULL, uf = NULL, abrangencia = NULL)

Arguments

sistema

System name accepted by [datasus_catalogo()].

conjunto

Dataset name listed by [datasus_catalogo()]. When omitted, uses the default dataset for the system.

uf

State abbreviation, two-digit IBGE code or state name. When 'NULL', uses the Brazil form.

abrangencia

Optional geographic detail for SIM and SINASC: '"municipio"' for the nationwide municipal form or '"uf"' for the region/state form. Other systems retain their existing behavior.

Value

An object of class 'datasus_opcoes'. Its components are data frames named 'linha', 'coluna', 'conteudo' and 'periodo', plus a named list 'filtros'.

Examples


old_options <- options(
  datasus.timeout = 5,
  datasus.download_timeout = 15,
  datasus.max_tries = 1
)
try({
op <- datasus_opcoes("sih", uf = "MS")
op$conteudo
op$filtros$carater_atendimento
})
options(old_options)


datasus documentation built on Oct. 7, 2026, 1:07 a.m.