I have a database of death records from a Brazilian city the nineteenth century, in which it contains many information, including place of death of each individual record. Unfortunately, the dataset has many inconsistencies, due to an overall lack of protocol when the database was constructed.
I'm trying to standardize the column containing places of death, in an attempt to spatialize this data in a GIS software. I've been using grepl() in RStudio, but have noticed it still doesn't work completely. Let me show an example:
amachado <- grepl("alvares machado,|alvares machado|rua alvarez machado|Rua Alvares Machado|rua alvaro machado|rua alves machado, no 14", recorte$local, ignore.case = TRUE)
recorte$local[amachado] <- "Rua Álvares Machado"
When I check in "recorte", "rua alves machado, no 14" doesn't get transformed properly. In this case I copied exactly the information written in the database but it still doesn't work.