[Rd] Depending on many packages: another best practice question

Dirk Eddelbuettel edd at debian.org
Sat Feb 24 16:00:51 CET 2007

On 23 February 2007 at 19:38, hadley wickham wrote:
| ggplot currently requires 13 packages (grid, reshape, RColorBrewer,
| proto, splines, MASS, Hmisc, boot, butler, hexbin, mapproj, quantreg,
| sm).  Some of these are absolutely necessary (eg. proto), but most are
| used for one or two specific tasks (eg. boot is only used to get
| plogis, used for logit scales).
| Do you think I should make them all "depends" packages, or "suggests"
| packages, and then manually test for package presence before using a
| certain function?  What is easier for users?

Rcmdr uses to have hard Depends. Given that I maintained Rcmdr in Debian, I
had to add a lot of additional packages to Debian only to cover Rcmdr's build

John later changed that to Suggests

   Depends: R (>= 2.1.0), tcltk, grDevices, utils
   Suggests: abind, car (>= 1.2-1), effects (>= 1.0-7), foreign, grid,
   lattice, lmtest, MASS, mgcv, multcomp (>= 0.991-2), nlme, nnet, relimp,
   rgl, RODBC 

which he then tests for in Startup.R.  I think Graham's rattle does something

I think you will get confused users either way as it is impossible to please
all the people all the time. Foolprof methods only attract smarter fools.

Hope this helps, Dirk

Hell, there are no rules here - we're trying to accomplish something. 
                                                  -- Thomas A. Edison

More information about the R-devel mailing list