[R] danish characters - installing R - linux redhat 8.0

Peter Dalgaard BSA p.dalgaard at biostat.ku.dk
Mon Apr 14 11:21:49 CEST 2003


"Niels Steen Krogh" <nielssteenkrogh at hotmail.com> writes:

> I'm using R on a linux redhat 8.0 installation.
> 
> The special danish characters (ÅØÆæøå) are showed wrong on the screen.
> 
> Example:
> 
> yy<-matrix(c(0,2,1,1,8),ncol=1,dimnames=list(c("Brøæå","AGF","AB","Farum","FC-Kbh."
> ),c("Stemmer")))
> 
> barplot(yy[1:5],ylab=names(as.data.frame(yy)),main="5. grade.... ")
> 
> 
> Any hints?

UTF-8 characters, I suspect. R doesn't know how to deal with those
(volunteers?). Works for me with Danish letters, but I have.

LANG=C
LC_CTYPE=da_DK

i.e. my /etc/sysconfig/i18n is now

#LANG="en_US.UTF-8"
#SUPPORTED="da_DK.UTF-8:da_DK:da:en_DK.UTF-8:en_DK:en:en_US.UTF-8:en_US:en"
#SYSFONT="latarcyrheb-sun16"
LANG=C
LC_CTYPE=da_DK

I use the "C" locale to get "ls -a" to behave as it's makers intended
and to avoid seeing Danish translations of system messages, which are
awkward to put it amicably... (Not that anyone else gets translations
right.)  You might also use LANG=da_DK and then the LC_CTYPE setting
should be irrelevant.

-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)             FAX: (+45) 35327907



More information about the R-help mailing list