[R] Accents in R
Prof Brian Ripley
ripley at stats.ox.ac.uk
Mon Nov 17 19:13:59 CET 2003
Just to make sure people know:
The issue is the use of UTF-8 encoding in some recent Linux distros, as PD
said. We do plan to support UTF-8 fairly soon.
Try locale -a on your Linux machine. Mine has (for Spanish in Spain)
es_ES
es_ES.iso88591
es_ES.iso885915 at euro
es_ES.utf8
es_ES.utf8 at euro
es_ES at euro
You need to set LC_CTYPE appropriately, and that is *not* any of those
containing `utf8'.
On Mon, 17 Nov 2003 kjetil at entelnet.bo wrote:
> On 17 Nov 2003 at 17:14, Xavier Fernández i Marín wrote:
>
> On my windows XP machine I get
>
> > help.search("locale")
> > ?locales
> help() for `locales' is shown in browser
> > Sys.getlocale()
> [1] "LC_COLLATE=English_United States.1252;LC_CTYPE=English_United
> States.1252;LC_MONETARY=C;LC_NUMERIC=C;LC_TIME=English_United
> States.1252"
> > #Sys.setlocale()
> > c("España", "Nicaragüense")
> [1] "España" "Nicaragüense"
> >
>
> You need to find out which locales you can set in Mandrake. The
> locale shown above
> is the default when I start up my R.
>
> Kjetil Halvorsen
>
> > Hi,
> >
> > How can I include accents and signs like 'ñ' 'à' in the plots
> > generated by R?
> >
> > I try, but R automatically transforms the name
> > ex:
> > > countries <- c("México", "España")
> > > countries
> > [1] "M\216éxico" "Espa\216ña"
> > >
> >
> > I've seen in some Spanish texts about R how is it normal to include
> > labels of the plots and other names with accents, but I can't.
> >
> > I'm using R 1.8.0 in a Mandrake 9.0
--
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595
More information about the R-help
mailing list