Re: [Rd] Re: Packages and Libraries (was: Re: lme4 "package" etc ..)

From: Kurt Hornik <>
Date: Thu 10 Feb 2005 - 03:14:08 EST

>>>>> Peter Dalgaard writes:

> Kurt Hornik <> writes:

>> >>>>> A J Rossini writes:
>> > But I don't see a problem with "package("package")", though I'm sure
>> > I'm missing something.
>> package() [sic] might be the creator for package objects, provided we
>> can decide on what they are (and what kind of packages [source,
>> installed, ...] they are used for).
>> usePackage() or use_package() otoh would indicate to "use" a package
>> (i.e., load and attach it). The tricky part is deciding about the
>> interface (e.g., finally disallowing non-standard evaluation as it is a
>> programmer's nightmare) and what it should return. And that is work in
>> progress ...

> Any information on the rate...? (I still vote for usepackage() btw.)

Why not use(), as the GCD?

> It would be good if we could at least have an outline of the intended
> functionality and see if we could forge ahead and get a preliminary
> version done in time for 2.1.x

Help us out.

        use <- function(package, pos = 2, lib.loc, ...)

where 'package' is either a character string or some sort of package object/reference, to be specified later. And 'lib.loc' needs to have a different name if we rename libraries into stores or whatever ...

What should this return? Currently, 'library' returns the list of loaded (or available) packages by default, as a list of names, which is not good enough. So we need something like the DLLInfoList returned by getLoadedDLLs() (and the docs should actually mention that class), or something usable by the package management tools ... and this is under redesign as well.

But why should this really return info on all loaded/attached packages? An alternative might be just returning the package meta-data in some form. Or nothing, which would fit into the idea that it really does nothing apart from loading and attaching a package.

(And maybe a condition object inheriting from packageLoadAndAttachError in case of failure? :-))

-k mailing list Received on Thu Feb 10 03:32:49 2005

This archive was generated by hypermail 2.1.8 : Fri 18 Mar 2005 - 09:02:47 EST