[Rd] install.packages and bundles

Uwe Ligges ligges at statistik.uni-dortmund.de
Thu Jan 6 10:16:22 CET 2005

Warnes, Gregory R wrote:

> 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.

This is already done, at least in R-2.0.1 if "dependencies" is set to 

> 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.

You already get the packages in bundles in the "Contains" column with


> Comments?
> Gregory R. Warnes
> Associate Director, Non-Clinical Statistics
> Pfizer Global Research and Development
> LEGAL NOTICE\ Unless expressly stated otherwise, this messag...{{dropped}}
> ______________________________________________
> R-devel at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel

More information about the R-devel mailing list