How to remove accents in R?

Asked

Viewed 50 times

2

How to efficiently remove accents and tilde in the R? What I want to do is to do it in a more practical way than to specify the substitution letter by letter.

estados=c("São Paulo","Paraíba","Espírito Santo")

estados <- sub("ã","a",estados)
estados <- sub("í","i",estados)
estados <- sub("í","i",estados)
estados

[1] "Sao Paulo"      "Paraiba"        "Espirito Santo"
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.