From ripley at stats.ox.ac.uk  Fri Oct 17 16:10:22 2003
From: ripley at stats.ox.ac.uk (Prof Brian Ripley)
Date: Fri Oct 17 16:09:36 2003
Subject: [Rd] data() misbehaving inside a function
In-Reply-To: <Pine.A41.4.58.0310170644370.180024@homer07.u.washington.edu>
Message-ID: <Pine.LNX.4.44.0310171505050.1203-100000@gannet.stats>

On Fri, 17 Oct 2003, Thomas Lumley wrote:

> On Fri, 17 Oct 2003, Kurt Hornik wrote:
> 
> > >>>>> Peter Dalgaard writes:
> >
> > > Kurt Hornik <Kurt.Hornik@wu-wien.ac.at> writes:
> > KH> Or get rid of non-standard evaluation and educate users to use quoted
> > KH> strings where strings should be used.
> > >>
> > >> > and infuriate those who know and used the S language for more than 15
> > >> > years, where help(help) has always worked?
> > >>
> 
> help(help) might be unavoidable, but there is nothing incompatible with S
> about requiring the argument to data() to be quoted, and that was what the
> original question was about.

It was about the *package* argument to data, and I see no reason at all
why that should be accepted as a name.  We don't allow lib.loc in
library() to be a name, and that seems the closest equivalent.

I think that for back-conmpatibility we do need to allow

?topic
help(topic)
data(dataset)

but could require the package argument to be quoted (note that data has a
list= argument, and help could be given a character.only one).

-- 
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 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595


[Rd] data() misbehaving inside a function
Prof Brian Ripley