1
I try to solve the problem of accents with this script:
Mapa@data$NAME_2 <- Mapa@data$NAME_2 %>% 
      as.character() %>% 
      stri_trans_general("Latin-ASCII") %>% 
      toupper()
But when I open the column NAME_2, the name of the municipalities is, for example: 
MACEIA³ instead of MACEIO or MACEIO.
Mapa@data$NAME_2 is a column with the name of the municipalities of Brazil.
Which command are you using to read the data? You need to set the encoding to "utf-8".
– Antonio C. da Silva Júnior