Re: AW: [R] read.table problems

About this list Date view Thread view Subject view Author view Other groups

Subject: Re: AW: [R] read.table problems
From: Peter Dalgaard BSA (p.dalgaard@biostat.ku.dk)
Date: Mon 15 Nov 1999 - 23:07:43 EST


Message-ID: <x2903zvr6o.fsf@blueberry.kubism.ku.dk>

Kurt Hornik <Kurt.Hornik@ci.tuwien.ac.at> writes:

> >> read.table("d:/temp/t.dat", sep=";", dec.sep=",")
> > V1 V2
> > 1 1 2.3
> > 2 4 5.6
>
> I am not sure we should do this.
>
> If you are trying to read in German-format numbers, this should be
> doable by setting the locale accordingly. Does anyone know whether
> strtod() will work this way?

Only too well, I'm afraid. AFAIR we specifically do *not* localize
LC_NUMERIC for that reason. Will also affect as.numeric(), etc., causing
general panic. Besides, we'll always have problems with not knowing
the locale in which a .csv was created.

-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk)             FAX: (+45) 35327907
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel 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-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b25 : Tue 04 Jan 2000 - 14:16:10 EST