[R] Problem with data.frames
Prof Brian Ripley
ripley at stats.ox.ac.uk
Mon Aug 4 14:21:20 CEST 2003
On Mon, 4 Aug 2003, Simon Fear wrote:
> What I meant by "like library()" is that this function ensures that a
> (or should I say package?) does not get loaded twice / duplicated in the
> search path. Of course attach() is not the same as library(). Nor is it
> same as with() - I just thought it might be useful if the help pages
> to each other.
Yes. The strange thing to me is that with does not point to attach.
We'll add xrefs.
> Because I have programmed for years using attach() and
> detach() and only very recently discovered with() (which is nearly
> what I want since I work mostly with scripts).
> > So how can you tell if the data frame is on the search list
> "my.dframe" %in% search() ?
That says if a data frame *of that name* is on the search list, and my
point was that whereas packages are responably identified by name, data
frames are not. It's common to use DF tmp repeatedly.
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