From gregory.r.warnes at pfizer.com  Wed Jan  5 19:41:29 2005
From: gregory.r.warnes at pfizer.com (Warnes, Gregory R)
Date: Wed Jan  5 19:41:52 2005
Subject: [Rd] install.packages and bundles
Message-ID: <915D2D65A9986440A277AC5C98AA466F9787E3@groamrexm02.amer.pfizer.com>


Hi All,

Since I changed the gregmisc package into a bundle, I almost daily questions
asking how to get the individual packages contained in the bundle.  

The standard example arises when someone attempts to install and then use my
'genetics' package which depends on the 'gdata' package contained within the
'gregmisc' bundle.  The install succedes, but when the user does
library(genetics) they get the error message:

	> library(genetics)
	Loading required package: gdata 
	Error: package 'gdata' could not be loaded

The user then attempts to install the package 'gdata' not realizing that it
is part of the (e.g.) gregmisc bundle, and can't find it.  For example

	> install.packages("gdata")
	trying URL
`http://cran.r-project.org/bin/windows/contrib/2.0/PACKAGES'
	Content type `text/plain; charset=iso-8859-1' length 24149 bytes
	opened URL
	downloaded 23Kb

	Warning message: 
	No package "gdata" on CRAN. in: download.packages(pkgs, destdir =
tmpd, 
	available = available,  

Now the user is in trouble and sends me an error message asking how to get
the 'gdata' package.

A couple of minor changes to the package installation/listing tools would
help alleviate this and some related problems.

1) Modify install.packages() so that the by default "dependencies=TRUE",
since this knows how to find dependencies within bundles.  
	(Why is this FALSE by default anyway?  In normal circumstances, is
there any
             reason to install a package without installing its
dependencies?)

2) Modify install.packages() to check if a requested package is contained in
a bundle, and install the bundle if so.

3) Modify CRAN.packages() to list packages contained within bundles as well
as independent packages, so that the windows "install packages from CRAN"
menu item will properly show bundled packages.


Comments?

Gregory R. Warnes
Associate Director, Non-Clinical Statistics
Pfizer Global Research and Development



LEGAL NOTICE\ Unless expressly stated otherwise, this messag...{{dropped}}


[Rd] install.packages and bundles
Warnes, Gregory R