[R] using data() in an example

ripley@stats.ox.ac.uk ripley at stats.ox.ac.uk
Mon Mar 3 10:39:03 CET 2003


I agree, and BTW the sort order is the same in locale en_GB on Linux and
Solaris, so this is a common trap.  I could understand CcRr as a sort 
order (it's dictionary order), but cCrR is hard to accept.

I think that RedHat 7.x/8.0 sets up locale en_GB as the default in the
UK: I keep on having to remember to change it on our boxes.

I had made a note to look into data().

Meanwhile the best fix is to save the object and use bailey.rda (and 
nothing else).

On 3 Mar 2003, Peter Dalgaard BSA wrote:

> ripley at stats.ox.ac.uk writes:
> 
> > ?data says
> > 
> >         4.  files ending `.csv' are read using `read.table(..., header
> >            = TRUE, sep = ";")', and also result in a data frame.
> > 
> > That may well be found first, so you need to rename bailey.csv.
> > 
> > You don't tell us your OS, but it looks like Windows where sorts often 
> > have c before R in the default locale:
> 
> Yikes! Thanks for pointing this out, Brian. 
> 
> I think we should consider it a bug(-let) and change data() to ensure
> that .R files are found before any other extensions, exactly because
> of this sort of application.
> 
> 

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595




More information about the R-help mailing list