[R] numbers and decimal points

Peter Dalgaard BSA p.dalgaard at biostat.ku.dk
Fri Mar 14 17:56:44 CET 2003


ripley at stats.ox.ac.uk writes:

> On Fri, 14 Mar 2003, janet rosenbaum wrote:
> 
> > I have a question for our European readers:  how common is it to use
> > commas as decimal points in spread-sheet and statistics applications?
> > 
> > Is it an inconvenience to require that all data use a period as decimal point?
> > (i.e., 3.14159 rather than 3,14159).
> 
> Depends where you are in Europe ... it is extremely uncommon to the far
> west of Europe.  Note that R itself does not allow this, so presumably
> people using R do not find it an inconvenience and you will have seriously
> skewed your sampling frame by asking on R-help if your program is not R
> itself.

OTOH, various Microsoft abominations (and I'm afraid also some non-MS
ones) switch the decimal symbol in many locales, so that a
tab-delimited file in Denmark and Germany will have commas instead of
periods (and CSV files use semicolon instead of comma). This is the
reason for having read.delim2 and read.csv2 in R. 

Windows users in DK practically speaking cannot save spreadsheets and
databases in the period-format without changing the locale settings of
the computer. 

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