AW: [R] read.table problems

Peter Dalgaard BSA p.dalgaard@biostat.ku.dk
15 Nov 1999 14:07:43 +0100


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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._