Re: [R] Comparing Latin characters with and without accents?

2014-12-15 Thread Ista Zahn
On Mon, Dec 15, 2014 at 12:33 AM, Spencer Graves wrote: > Hello, All: > > > What do people do to strip accents from latin characters, returning > vanilla ASCII? I find the stringi package works well for this sort of thing, e.g., library(stringi) x <- c("!", "\"", "#", "$", "%", "&", "

Re: [R] Comparing Latin characters with and without accents?

2014-12-15 Thread Prof Brian Ripley
On 15/12/2014 05:33, Spencer Graves wrote: Hello, All: What do people do to strip accents from latin characters, returning vanilla ASCII? I think the devil is the detail here: what is Latin? Latin-1 has characters for which this is unclear, let alone Latin-2 or Latin-7. What I

Re: [R] Comparing Latin characters with and without accents?

2014-12-14 Thread Spencer Graves
Hello, All: What do people do to strip accents from latin characters, returning vanilla ASCII? For example, I want to convert ‘Raúl’ to “Raul”. Milan (below) suggested 'iconv(x, “", "ASCII//TRANSLIT”)’. This worked under Windows but failed on Linux and Mac. It’s p

Re: [R] Comparing Latin characters with and without accents?

2014-11-30 Thread Spencer Graves
Wonderful. Thanks very much. Spencer On 11/30/2014 2:25 AM, Milan Bouchet-Valat wrote: Le dimanche 30 novembre 2014 à 02:14 -0800, Spencer Graves a écrit : Hello: How can one convert Latin characters with to the corresponding characters without? For example, I want to convert "ú"

Re: [R] Comparing Latin characters with and without accents?

2014-11-30 Thread Milan Bouchet-Valat
Le dimanche 30 novembre 2014 à 02:14 -0800, Spencer Graves a écrit : > Hello: > > >How can one convert Latin characters with to the corresponding > characters without? For example, I want to convert "ú" to "u", similar > to how tolower('U') returns "u". > > >This can be done

[R] Comparing Latin characters with and without accents?

2014-11-30 Thread Spencer Graves
Hello: How can one convert Latin characters with to the corresponding characters without? For example, I want to convert "ú" to "u", similar to how tolower('U') returns "u". This can be done using chartr{base}, e.g., chartr('ú', 'u', 'Raúl') returns "Raul". However, I wondere