From ripley at stats.ox.ac.uk  Sun Aug 29 09:09:08 2004
From: ripley at stats.ox.ac.uk (Prof Brian D Ripley)
Date: Sun Aug 29 09:07:05 2004
Subject: [Rd] attach behavior
In-Reply-To: <41317BDA.3010101@univie.ac.at>
References: <41317BDA.3010101@univie.ac.at>
Message-ID: <Pine.WNT.4.58.0408290807160.1880@auk>

On Sun, 29 Aug 2004, Erich Neuwirth wrote:

> In R 1.9.1, attaching an object more than once puts the object's name on
> the search path more than once also. Therefore, to remove it, one has to
> detach it multiply.
> Wouldn'tn it make sense to change the behavior of attach in a way
> that object names are not added to the search path more than once?

They need not be the same object, so no.  It's quite common practice to
modify an object, attach it temporarily and detach it again.  I suspect
that people using attach() frequently should be thinking more in terms of
with().

-- 
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] attach behavior
Prof Brian D Ripley