[Rd] No more autload() calls in .First.sys() ?

From: Jeffrey Horner <jeff.horner_at_vanderbilt.edu>
Date: Wed 13 Sep 2006 - 15:40:27 GMT

Jeffrey Horner wrote:
> This raises an interesting topic for me:
> In R-2.3.1, .First.sys() autloads() a few functions from the various
> default packages (utils, stats, methods, graphics) IF those packages
> weren't specified in the default packages option (or the environment
> variable R_DEFAULT_PACKAGES). For instance, if a user doesn't want the
> utils package automatically loaded, then .First.sys() does this:
> sch <- search()
> if(! "package:utils" %in% sch) {
> autoload("example", "utils")
> autoload("methods", "utils")
> autoload("str", "utils")
> }
> which will automagically load utils if a call to example, methods, or
> str is made (why just those three? why not others in utils). I presume
> there was some heuristic to determine exactly which functions were
> autoloaded.

To answer this, all I had to do is look at the subversion log:

r27733 | ripley | 2003-12-21 04:21:33 -0600 (Sun, 21 Dec 2003) | 3 lines

allow all the standard examples to run with R_DEFAULT_PACKAGES=NULL by judicious autoloading

That makes sense. But what about the change for R-trunk?

> Now in R-trunk today, I see that there are no autloaded functions set up
> from .First.sys() for any of the default packages. So if R is started
> with R_DEFAULT_PACKAGES=NULL, then no default packages will be loaded
> and no functions will be set up via autoload(). Why?
> Jeff


R-devel@r-project.org mailing list
Received on Thu Sep 14 01:42:23 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Wed 13 Sep 2006 - 16:30:20 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.