[R] How to specify search order for require()

Luke Tierney luke at stat.umn.edu
Fri Apr 12 19:45:17 CEST 2002


As of 1.4 (I believe) packages loaded by a require in the package
source, as oopsed to .First.lib, are loaded after the package that
calls require.  This was done in part to allow packages to
require(methods) and then use functions defined in methods within the
package body.

Hopefully R 1.6 will add a name space mechanism that will provide much
finer control over package dependencies; some information on how that
might work along with a draft implementation is available off the
developer page developer.r-project.org or at
http://www.stat.umn.edu/~luke/R/namespaces/morenames.html.

luke

On Fri, Apr 12, 2002 at 12:06:31PM -0400, Frank E Harrell Jr wrote:
> In a .First.lib I want to issue two require()s to insure that two other packages are loaded.  But I want the package being loaded by .First.lib using library.dynam("mypackage",pkb,lib) to be higher in the search order than the two required packages, because I want to have a couple of functions from the two required packages overridden.  What is the best way to do that?  Thanks in advance -Frank
> 
> -- 
> Frank E Harrell Jr              Prof. of Biostatistics & Statistics
> Div. of Biostatistics & Epidem. Dept. of Health Evaluation Sciences
> U. Virginia School of Medicine  http://hesweb1.med.virginia.edu/biostat
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
> Send "info", "help", or "[un]subscribe"
> (in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
> _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._

-- 
Luke Tierney
University of Minnesota                      Phone:           612-625-7843
School of Statistics                         Fax:             612-624-8868
313 Ford Hall, 224 Church St. S.E.           email:      luke at stat.umn.edu
Minneapolis, MN 55455 USA                    WWW:  http://www.stat.umn.edu
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list