utf 8 - Simplifying characters with ornaments in R -
this question has answer here:
- replace multiple letters accents gsub 10 answers
i have names of music artists working within spotify api. i'm having issues dealing strings because of characters' accents. don't have understanding of character encoding.
i'll provide more context bit further below, wondering if there way in r "simplify" characters ornaments.
essentially, interested if there function take c("ë", "ö") input, , return c("e", "o"), removing ornaments characters.
i don't think can create reproducible example because of issues api authentication, context, when try run:
artistname <- "tiësto" get(paste0("https://api.spotify.com/v1/search?q=", artistname, "&type=artist"), config(token = token)) the following gets sent api:
https://api.spotify.com/v1/search?q=tiësto&type=artist returning me 400 bad request error. trying alter strings pass get function can useful output.
here found, , may work you. simpler , convenient apply on form of data.
> artistname <- "tiësto" > iconv(artistname, "latin1", "ascii//translit") [1] "tiesto"
Comments
Post a Comment