Skip to content

danish characters - installing R - linux redhat 8.0

2 messages · Niels Steen Krogh, Peter Dalgaard

#
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?



Cand. Polit.
Niels Steen Krogh
Solsortvej 44
2000 F.

Tlf: 3888 8613

ZiteLab / Empower your data



_________________________________________________________________
Få Hotmail på mobilen http://www.msn.dk/mobile
2 days later
#
"Niels Steen Krogh" <nielssteenkrogh at hotmail.com> writes:
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.