[R] Problem with data.frames

Prof Brian Ripley ripley at stats.ox.ac.uk
Mon Aug 4 18:36:16 CEST 2003


On Mon, 4 Aug 2003, Thomas Lumley wrote:

> On 4 Aug 2003, Peter Dalgaard BSA wrote:
> >
> > It's rarely advisable to nanny users too much though (as someone said:
> > protecting users from doing dumb things may also prevent them from
> > doing smart things). In the case of warnings, it is not a good thing
> > if they can trigger due to circumstances beyond the user's control.
> 
> I would have thought a warning was relatively harmless, especially now
> that the package writer can use with(), or something like
>    attach(mydata, name="privatedata:mydata")

Often you cannot use with(), as that does assignments in the wrong 
environment (something which is always catching me).

I don't think we can reasonably expect package writers to work around an
unnecessary restriction.  As John Fox has pointed out, anyone who wants to
can write a new function to do the warning, or disallow duplicate names or
...

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