Skip to content

Conversation

@rmhirota
Copy link

A função process_sinan_malaria() parece estar quebrando na hora de arrumar a coluna de idade:

sinan_raw <- microdatasus::fetch_datasus(
  year_start = 2014,
  year_end = 2014,
  information_system = "SINAN-MALARIA"
)
#> ℹ Your local Internet connection seems to be ok.
#> ℹ DataSUS FTP server seems to be up and reachable.
#> ℹ Starting download...

sinan_p <- microdatasus::process_sinan_malaria(sinan_raw)
#> Error in fcase(NU_IDADE_N == 999, NA, rep(TRUE, .N), NU_IDADE_N): Argument #4 is of type integer, however argument #2 is of type logical. Please make sure all output values have the same type.

Created on 2025-09-17 with reprex v2.1.1

Testei com esse caso e parece que é só questão de mudar o NA para NA_integer_

Muda processamento da idade de `NA` para `NA_integer_` quando NU_IDADE_N == 999
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant