Re: R-beta: R and LANG

Peter Dalgaard BSA (
08 Jan 1998 16:19:28 +0100

To: Goran Brostrom <>
Subject: Re: R-beta: R and LANG
From: Peter Dalgaard BSA <>
Date: 08 Jan 1998 16:19:28 +0100
In-Reply-To: Goran Brostrom's message of Thu, 8 Jan 1998 14:53:37 +0100 (MET)

Goran Brostrom <> writes:

> I am running R 0.61.0 on a Sparc 5, Solaris 2.4, in tcsh. Today I
> couldn't, to my big surprise, scan a data file in R. As I finally
> understood it, R wanted a decimal comma instead of a decimal point,
> because LANG was set to 'sv'. See my runs below. I wonder why this=20

Apparently, the strtod() C library function accepts different formats
depending on locale settings, so probably the setlocale(LC_ALL,""); in
src/main/main.c is doing you in.=20

This is the same thing that allows you to have a variable called
"f=F6r=E4ldre" and see come out right on plots, etc., so you don't want =
remove that line.=20

I think that either you should setenv LC_NUMERIC to C or POSIX or R
should only set LC_CTYPE (and maybe some of the others?).

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

r-help mailing list -- Read
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: