hadley wickham
2007-Feb-24 01:38 UTC
[Rd] Depending on many packages: another best practice question
Dear all, 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? Thanks, Hadley
Dirk Eddelbuettel
2007-Feb-24 15:00 UTC
[Rd] Depending on many packages: another best practice question
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 requirements. 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 similar. 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
Prof Brian Ripley
2007-Feb-24 18:38 UTC
[Rd] Depending on many packages: another best practice question
On Fri, 23 Feb 2007, hadley wickham wrote:> Dear all, > > 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).Hmm, there is no plogis in boot, but there is in stats.> 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?The second, especially as from 2.5.0 the 'Depends' and 'Imports' are installed by default. What you have not mentioned is that those packages also have dependencies. Using 'Depends' on a non-CRAN package (e.g. hexbin) is definitely awkward for the user/sysadmin and I would try to avoid it. I've been here with ggplot for my GGobi class, and a smaller set of would have been helpful. Do you really need reshape, for example? -- Brian D. Ripley, ripley at 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