From ripley@stats.ox.ac.uk  Thu Jun  1 07:24:55 2000
From: ripley@stats.ox.ac.uk (Prof Brian D Ripley)
Date: Thu, 1 Jun 2000 07:24:55 +0100 (GMT Daylight Time)
Subject: [Rd] read.table and strip.white
In-Reply-To: <39355B51.6A7D9361@statistik.uni-dortmund.de>
Message-ID: <Pine.WNT.4.05.10006010714300.193-100000@tern.stats>

On Wed, 31 May 2000, Uwe Ligges wrote:

> Prof Brian Ripley wrote:
> 
> > > [...]
> 
> > I was rather surprised here, and this is not what the prototype does:
> > 
> >   .col1. .col2. .col3.
> > 1      1      1      1
> > 2      2      2      2
> > 
> > Should not strip.white be true for the header line?
> 
> If there are no compatibility problems, setting it to TRUE would be
> useful ...
> But compatibility is an important point, especially in read.table(.), I
> think. Many R users have got their own functions using read.table(.), I
> suppose. Maybe changing the defaults could break anything?

That's tantamount to saying we should not fix bugs because users might be
relying on the undocumented and unintended behaviour!  Yes, changing this
could change things: for a start the V&R MASS datasets would load correctly
on R without R-specific editing.  Does anyone seriously intend to have
heading spaces in their column names in a data frame? Especially as those
are not S variable names, and as you see S-PLUS (but not R) does enforce
that.  (read.table circumvents that by not using the class
constructor, but S-PLUS has an explicit call to make.names lacking in R.)

I am inclined to make the change _and_ to check the column names.

Brian

-- 
Brian D. Ripley,                  ripley@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 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

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


[Rd] read.table and strip.white
Prof Brian D Ripley