[R] load data for mypkg-Ex.R

Prof Brian Ripley ripley at stats.ox.ac.uk
Sat Feb 28 10:02:53 CET 2004

On Fri, 27 Feb 2004, Roger Koenker wrote:

> On a related note.... is there a convention for cleaning up the detritus
> after running
> 	example(foo)
> I suppose sometimes users would like to have access to the objects
> that were created in the course of this, but perhaps more likely they
> would prefer that they were vaporized.   I'm finding this also an issue
> in writing vignettes,  but my main concern is finding a good way to
> handle this in writing .Rd files.

We tend only to clean up temporary objects, and the search path.
As Tony says, users can call example() with local=TRUE, and the checking 
code tidies up after each help file.  There are several examples of one 
help file calling example() on another and working further with the same 

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