Re: [R] remove accents in strings

2010-09-07 Thread David Winsemius
On Sep 7, 2010, at 2:29 PM, Matt Shotwell wrote: Weird, my (Ubuntu, s don't tell Dirk) iconv doesn't add the backticks or single quotes. I don't see any promise in the help page that iconv should substitute anything for the accents. It just says each OS may have its own behavior and

Re: [R] remove accents in strings

2010-09-07 Thread Matt Shotwell
Weird, my (Ubuntu, s don't tell Dirk) iconv doesn't add the backticks or single quotes. > tst <- c("à", "è", "ì", "ò", "ù" , "À", "È", "Ì", "Ò", "Ù", "á", + "é", "í", "ó", "ú", "ý" , "Á", "É", "Í", "Ó", "Ú", "Ý") > iconv(tst, to="ASCII//TRANSLIT") [1] "a" "e" "i" "o" "u" "A" "E" "I" "O" "U"

Re: [R] remove accents in strings

2010-09-07 Thread David Winsemius
On Sep 7, 2010, at 1:35 PM, Matt Shotwell wrote: If you know the encoding of the string, or if its encoding is the current locale encoding, then you can use the iconv function to convert the string to ASCII. Something like: iconv(accented.string, to="ASCII//TRANSLIT") While 7-bit ASCII doe

Re: [R] remove accents in strings

2010-09-07 Thread Matt Shotwell
If you know the encoding of the string, or if its encoding is the current locale encoding, then you can use the iconv function to convert the string to ASCII. Something like: iconv(accented.string, to="ASCII//TRANSLIT") While 7-bit ASCII does not permit accented characters, extended (8-bit) ASCII

[R] remove accents in strings

2010-09-07 Thread lamack lamack
Dear all, there is a R function to remove all accents in strings? best regards. JL [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-