Re: Re: R-beta: R and LANG

Goran Brostrom (gb@stat.umu.se)
Thu, 8 Jan 1998 16:32:47 +0100 (MET)


Date: Thu, 8 Jan 1998 16:32:47 +0100 (MET)
From: Goran Brostrom <gb@stat.umu.se>
To: Peter Dalgaard BSA <p.dalgaard@biostat.ku.dk>
Subject: Re: Re: R-beta: R and LANG
In-Reply-To: <x2afd7t2m7.fsf@blueberry.kubism.ku.dk>


On 8 Jan 1998, Peter Dalgaard BSA wrote:

> Goran Brostrom <gb@stat.umu.se> writes:
>=20
> > 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
>=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
>=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 t=
o
> remove that line.=20
>=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?).

Yes, the combination (LANG =3D sv & LC_NUMERIC =3D C) seems to work properl=
y.
Thanks!

Goran

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._