[R] Follow-up: pos= in library and require
luke at stat.umn.edu
Sat Apr 13 16:26:43 CEST 2002
On Sat, Apr 13, 2002 at 02:01:01PM +0100, ripley at stats.ox.ac.uk wrote:
> On Sat, 13 Apr 2002, Frank E Harrell Jr wrote:
> > Unfortunately I found that adding pos= in the attach( ) inside library( ) results in a corruption of the search list. Packages will be attached in the desired position but the system then can't find any objects in that position. I would really appreciate R correctly implementing pos= in library( ) and require( ).
> As you know (I hope) R 1.5.0 is currently in feature freeze.
> We've had a request to do this before, and we will look into it for 1.6.x.
> One issue that occurred to me was what one should do about calls to
> library() or require() from the .First.lib (or on loading the code) of a
> package if a pos argument is allowed. Are the dependent packages supposed
> to displace the first package or not? What if the dependent packages are
> themselves given a pos= argument (as I think you wanted)?
> I prefer to do tricky things early in the release cycle, to allow plenty
> of experience with them. Time has shown that few changes are
> transparently simple.
I agree. And the more I think about trying to do this at the
library/require level the more nervous I get--because of the dynamic
nature of the search path I worry that it will lead to all sorts of
nasty litle bugs. Hopefully I will be able to put a first pass at
name spaces into R-devel very soon after 1.5 is released, which should
give us a significant period to exercise it before 1.6 is released. I
think it would be better to try to use that approach to manage this
sort of thing and only resort to changing library/require if for some
reason name spaces prove inadequate. I am actually fairly hopeful
that name spaces will allow us to deprecate require before too long,
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