From MSchwartz at MedAnalytics.com  Thu Mar 10 18:51:24 2005
From: MSchwartz at MedAnalytics.com (Marc Schwartz)
Date: Thu Mar 10 18:51:35 2005
Subject: [Rd] dealing with package bundles (was RE: [R] Gregmisc)
In-Reply-To: <Pine.LNX.4.61.0503101609000.2060@gannet.stats>
References: <3A822319EB35174CA3714066D590DCD50994E823@usrymx25.merck.com>
	<Pine.LNX.4.61.0503101609000.2060@gannet.stats>
Message-ID: <1110477084.7934.43.camel@horizons.localdomain>

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


[Rd] dealing with package bundles (was RE: [R] Gregmisc)
Marc Schwartz