| datasus_validar_esquema | R Documentation |
Compares the columns of a raw or standardized data frame with fields in [datasus_dicionario()]. This detects missing fields and incompatible target classes without treating newly introduced source columns as errors.
datasus_validar_esquema(
dados,
sistema,
tipo = NULL,
campos = NULL,
estrito = FALSE
)
dados |
A data frame containing raw or standardized records. |
sistema |
System accepted by [datasus_dicionario()]. |
tipo |
Optional raw file type for SIM, SINASC or SIH. |
campos |
Optional source or standardized field names to require. 'NULL' checks every curated field for the selected system. |
estrito |
Whether missing or incompatibly typed standardized fields should raise an error. |
A data frame with source and standardized field names, presence, observed column and class, expected class and status. Attribute '"campos_extras"' lists columns outside the curated dictionary.
dados <- data.frame(
dt_vacina = "2025-01-10",
co_municipio_paciente = "5002704"
)
datasus_validar_esquema(dados, "pni_doses")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.