[Rd] data() misbehaving inside a function

Prof Brian Ripley ripley at stats.ox.ac.uk
Fri Oct 17 16:10:22 MEST 2003


On Fri, 17 Oct 2003, Thomas Lumley wrote:

> On Fri, 17 Oct 2003, Kurt Hornik wrote:
> 
> > >>>>> Peter Dalgaard writes:
> >
> > > Kurt Hornik <Kurt.Hornik at 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 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-devel mailing list