[Rd] [R] library(): load library from a specified location

Kevin Coombes kevin.r.coombes at gmail.com
Tue Apr 6 20:27:55 CEST 2010


If we're counting votes, then I vote "no".  And I'd be willing to help 
stuff the ballot box and even volunteer to count the final tallies in 
order to make sure that the "no" side wins.

I understand the logical argument in favor of "use" or "require" or 
"borrow". I am not swayed.

Backwards compatibility matters. A lot. This proposed change breaks an 
unfathomably large amount of existing code.  With zero gain in terms of 
performance or reliability.  It probably does not even help new users 
just learning the language, since they still have to be confused about 
why there are two functions that do almost the same thing in terms of 
loading packages.

Even with a "long deprecation" time, I don't see the value. Just train 
yourself to interpret
 > library(aPackage)
as the syntactic form of the thing in R that has the semantic meaning: 
"go to the library and bring back aPackage".

Curmudgeonly,
    Kevin

Martin Maechler wrote:
> [ re-diverted to R-devel ]
>
>   
>>>>>> Barry Rowlingson <b.rowlingson at lancaster.ac.uk>
>>>>>>     on Tue, 30 Mar 2010 20:15:00 +0100 writes:
>>>>>>             
>
>     > On Tue, Mar 30, 2010 at 7:58 PM, Rolf Turner
>     > <r.turner at auckland.ac.nz> wrote:
>     >> But ***please*** say ``load *package*'', not ``load
>     >> library''.  The *location* (collection of packages) from
>     >> which you wish to load the given package is the
>     >> ``library''.
>
>     >  Anyone vote for deprecating the library() function and
>     > renaming it use() or requiring require() instead?
>
> I'm voting pro.   
>
>
> We (R core) had planned to do this, probably about 5 to eight
> years ago, then started discussing about possible features of
> the new  use()  function, of making a package into an "object"
> that you'd want to interrogate, ...
> and then probably got tired  ;-)
>
> With the many moons passed, I'd now tend to *not* add features,
> but really renamed 'library' to 'use' 
> and create a  library() with a deprecation message which then
> simply calls use()...
> and yes, I'd allow a very exceptionally long deprecation period
> of two to five years before making library() defunct.
>
> Martin
>
>     >  I mean, when I go get a book out of our library, I don't
>     > say "I'd like to library Case Studies in Spatial Point
>     > Process Modelling".  Maybe we should use
>     > 'borrow(package)'? Then it might be clear you were getting
>     > a package from a library, and that you magically put it
>     > back at the end of your R session....
>
>     >  Slightly silly mood this evening
>
>
>
>     > Barry
>
>     > ______________________________________________
>     > R-help at r-project.org mailing list
>     > https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do
>     > read the posting guide
>     > http://www.R-project.org/posting-guide.html and provide
>     > commented, minimal, self-contained, reproducible code.
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>



More information about the R-devel mailing list