[R] special characters
Peter Dalgaard BSA
p.dalgaard at biostat.ku.dk
Mon Jul 14 19:53:22 CEST 2003
BORGULYA Gábor <borgulya at gyer2.sote.hu> writes:
> Dear R-users,
>
> Some hours ago I successfully installed R 1.7.1 on my Linux computer
> (SuSE 8.1). Now I am trying to get my scripts work which I have
> written for R/Windows.
>
> * While with Windows I was able to use the vowels with the accents
> present in the Hungarian language:
>
> > d$crude.inc<-d$esetszám/d$évközepi.lélekszám*1000000
> >
>
> the same line leads to an error on Linux:
>
> > d$crude.inc<-d$esetszám/d$évközepi.lélekszám*1000000
> Error: syntax error
> >
This is generally a locale problem, specifically, LC_CTYPE needs to be
set so that (AFAIR) isprint() returns true on the printable characters
in Hungarian locale. Actually, most of the iso-8859 locales will do
(Does Hungarian use iso-8859-1 or -2, BTW?), e.g. for me
> d$crude.inc<-d$esetszám/d$évközepi.lélekszám*1000000
Error: Object "d" not found
> Sys.getenv("LC_CTYPE")
LC_CTYPE
"da_DK"
(NB: no syntax error in that, just a complaint that I didn't define
d). A fair guess is that you want to set
export LC_CTYPE=hu_HU
in your .profile, or systemwide wherever SuSE wants you to put it. You
can also set LANG or LC_ALL, although I choose not to because it
upsets other parts of the system (error messages, collating sequence,
etc.)
--
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