"Liaw, Andy" <andy_liaw at merck.com> writes:> Given the confusions that some users have regarding package bundles, I'd > like to suggest some changes to how package bundles are handled.I wonder if a guideline of naming packages bundles in a manner that identifies them as bundles would help? An example of what I'm thinking: gregmisc-bundle_x.y.z.tar.gz Then users could (once familiar with the convention) know when they are dealing with a bundle. Such a name scheme fits with my understanding of bundles: they provide a mechanism to download and install multiple packages at once. After installation there is no notion of bundle. One doesn't call library on a bundle (and I think that is a good thing). Best, + seth
Given the confusions that some users have regarding package bundles, I'd like to suggest some changes to how package bundles are handled. My understanding is that a package bundle is essentially a convenient way to distribute related packages, so that users can download/install them in one shot. However, some users apparently get confused that one can do install.packages("abundle") but can't do library("abundle"). I think it might be worthwhile having library() (or it's to-be replacement(s)) do something more informative, if the argument is the name of a bundle, instead of a package. Examples are: - Give an error that says that's a package bundle, and the constituent packages need to be loaded individually. - Load all of the packages in the bundle, but issue an warning. - (More elaborate) give a menu of packages and ask the user to choose which one to load. (Come to think of it, it would be nice for library() to be able to load multiple packages in one go...) One problem that I can see is that it seems like once a package bundle is installed, R basically has no knowledge that the packages belong to one bundle, other than the fact that the DESCRIPTION files of the packages have entries that indicate that they are part of a bundle. Are there ways to figure out such information other than checking packageDescription() of all installed packages? Cheers, Andy> From: Marc Schwartz > > On Thu, 2005-03-10 at 14:44 +0100, Christian Kamenik wrote: > > Dear all, > > > > I use R 2.0.1 on Windows XP professional. When I want to load the > > 'Gregmisc' library I get the following error message: > > > > Error in library(pkg, character.only = TRUE) : 'gregmisc' is not a > > valid package -- installed < 2.0.0? > > > > Can anybody tell me what's wrong with this package? > > > gregmisc is a _bundle_, not a package. It is now comprised of four > separate packages: > > 1. gtools > > 2. gdata > > 3. gmodels > > 4. gplots > > You will need to load the particular package that you wish to use or > load all four if you wish. > > HTH, > > Marc Schwartz > > ______________________________________________ > R-help@stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! > http://www.R-project.org/posting-guide.html > > >
Prof Brian Ripley
2005-Mar-10 17:27 UTC
[Rd] dealing with package bundles (was RE: [R] Gregmisc)
On Thu, 10 Mar 2005, Liaw, Andy wrote:> Given the confusions that some users have regarding package bundles, I'dJust one bundle, AFAICS.> like to suggest some changes to how package bundles are handled.The issue seems only to arise with one bundle that was formerly a package. I think re-naming that bundle would be the most effective solution. Alternatively, bundle 'gregmisc' could contain a package 'gregmisc' (there is an example of that already in CoCo) which told users what had happened (or even loaded all the components), which would also work with a rename.> My understanding is that a package bundle is essentially a convenient way to > distribute related packages, so that users can download/install them in one > shot. However, some users apparently get confused that one can do > install.packages("abundle") but can't do library("abundle"). I think it > might be worthwhile having library() (or it's to-be replacement(s)) do > something more informative, if the argument is the name of a bundle, instead > of a package. Examples are: > > - Give an error that says that's a package bundle, and the constituent > packages need to be loaded individually.How can you know that? The names of bundles are not known, and indeed `gregmisc' is a perfectly good package name and gregmisc 1.x might be what was intended.> - Load all of the packages in the bundle, but issue an warning. > > - (More elaborate) give a menu of packages and ask the user to choose which > one to load. > > (Come to think of it, it would be nice for library() to be able to load > multiple packages in one go...)In what order, and why, given that library() will already load all the dependencies in a sensible order?> One problem that I can see is that it seems like once a package bundle is > installed, R basically has no knowledge that the packages belong to one > bundle, other than the fact that the DESCRIPTION files of the packages have > entries that indicate that they are part of a bundle. Are there ways to > figure out such information other than checking packageDescription() of all > installed packages?No. As from 2.1.0, install.packages() will install a bundle given the name of a package it contains (at least if the repositories supply the information), so there will be little need for users to know about bundles. -- Brian D. Ripley, ripley@stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595
Marc Schwartz
2005-Mar-10 18:51 UTC
[Rd] dealing with package bundles (was RE: [R] Gregmisc)
On Thu, 2005-03-10 at 16:27 +0000, Prof Brian Ripley wrote:> On Thu, 10 Mar 2005, Liaw, Andy wrote:> > One problem that I can see is that it seems like once a package bundle is > > installed, R basically has no knowledge that the packages belong to one > > bundle, other than the fact that the DESCRIPTION files of the packages have > > entries that indicate that they are part of a bundle. Are there ways to > > figure out such information other than checking packageDescription() of all > > installed packages? > > No. > > As from 2.1.0, install.packages() will install a bundle given the name of > a package it contains (at least if the repositories supply the > information), so there will be little need for users to know about > bundles.This is likely to be considered a kludgy approach, but one way of linking packages to bundles with a more global approach (as opposed to one package at at time) is the following: # Get the set of currently installed packages, taking # just the package and bundle names Pkgs.Installed <- installed.packages()[, c("Package", "Bundle")] # Get the packages that are in bundles # "Bundle" will be NA if package is not in a bundle Pkgs.Installed[!is.na(Pkgs.Installed[, "Bundle"]), ] On my system, where I have installed all CRAN packages that do not require third party libs, I get the following:> Pkgs.Installed[!is.na(Pkgs.Installed[, "Bundle"]), ]Package Bundle CoCo "CoCo" "CoCo" CoCoCg "CoCoCg" "CoCo" CoCoCore "CoCoCore" "CoCo" CoCoGraph "CoCoGraph" "CoCo" CoCoObjects "CoCoObjects" "CoCo" CoCoOldData "CoCoOldData" "CoCo" CoCoRaw "CoCoRaw" "CoCo" Greene "Greene" "Ecdat" Hayashi "Hayashi" "Ecdat" MASS "MASS" "VR" class "class" "VR" dse1 "dse1" "dse" dse2 "dse2" "dse" gdata "gdata" "gregmisc" gmodels "gmodels" "gregmisc" gplots "gplots" "gregmisc" gtools "gtools" "gregmisc" nnet "nnet" "VR" spatial "spatial" "VR" svDialogs "svDialogs" "SciViews" svGUI "svGUI" "SciViews" svIDE "svIDE" "SciViews" svIO "svIO" "SciViews" svMisc "svMisc" "SciViews" svSocket "svSocket" "SciViews" svViews "svViews" "SciViews" tframe "tframe" "dse" One could then feasibly manipulate this information as one desires. HTH, Marc Schwartz
Prof Brian Ripley
2005-Mar-10 18:55 UTC
[Rd] dealing with package bundles (was RE: [R] Gregmisc)
On Thu, 10 Mar 2005, Marc Schwartz wrote:> On Thu, 2005-03-10 at 16:27 +0000, Prof Brian Ripley wrote: >> On Thu, 10 Mar 2005, Liaw, Andy wrote: > >>> One problem that I can see is that it seems like once a package bundle is >>> installed, R basically has no knowledge that the packages belong to one >>> bundle, other than the fact that the DESCRIPTION files of the packages have >>> entries that indicate that they are part of a bundle. Are there ways to >>> figure out such information other than checking packageDescription() of all >>> installed packages? >> >> No. >> >> As from 2.1.0, install.packages() will install a bundle given the name of >> a package it contains (at least if the repositories supply the >> information), so there will be little need for users to know about >> bundles. > > > This is likely to be considered a kludgy approach, but one way of > linking packages to bundles with a more global approach (as opposed to > one package at at time) is the following:There is code like that in new.packages. The problem is that looking at ca 500 packages is slow, especially on a laptop disc (or at least on the one of mine that has just died) but even on the fast RAIDs on our servers. Brian> # Get the set of currently installed packages, taking > # just the package and bundle names > Pkgs.Installed <- installed.packages()[, c("Package", "Bundle")] > > # Get the packages that are in bundles > # "Bundle" will be NA if package is not in a bundle > Pkgs.Installed[!is.na(Pkgs.Installed[, "Bundle"]), ] > > > On my system, where I have installed all CRAN packages that do not > require third party libs, I get the following: > >> Pkgs.Installed[!is.na(Pkgs.Installed[, "Bundle"]), ] > Package Bundle > CoCo "CoCo" "CoCo" > CoCoCg "CoCoCg" "CoCo" > CoCoCore "CoCoCore" "CoCo" > CoCoGraph "CoCoGraph" "CoCo" > CoCoObjects "CoCoObjects" "CoCo" > CoCoOldData "CoCoOldData" "CoCo" > CoCoRaw "CoCoRaw" "CoCo" > Greene "Greene" "Ecdat" > Hayashi "Hayashi" "Ecdat" > MASS "MASS" "VR" > class "class" "VR" > dse1 "dse1" "dse" > dse2 "dse2" "dse" > gdata "gdata" "gregmisc" > gmodels "gmodels" "gregmisc" > gplots "gplots" "gregmisc" > gtools "gtools" "gregmisc" > nnet "nnet" "VR" > spatial "spatial" "VR" > svDialogs "svDialogs" "SciViews" > svGUI "svGUI" "SciViews" > svIDE "svIDE" "SciViews" > svIO "svIO" "SciViews" > svMisc "svMisc" "SciViews" > svSocket "svSocket" "SciViews" > svViews "svViews" "SciViews" > tframe "tframe" "dse" > > One could then feasibly manipulate this information as one desires. > > HTH, > > Marc Schwartz > > >-- Brian D. Ripley, ripley@stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595