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

hadley wickham h.wickham at gmail.com
Sat Feb 24 20:21:53 CET 2007

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

Oops, I had originally included it to use logit and inv.logit, but
then realised I could use plogis etc instead.  That's one dependency

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

Ok, that makes sense then.

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

It's frustrating enough for the windows user, as suggests packages
seem to get installed by default as well.

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

Reshape powers the facetting, so is essential.  It also reflects my
philosophy of separating data manipulation from display, as opposed to
lattice which often combines the two (there are advantages and
disadvantages to both, of course)

I think the minimum I need is grid, reshape, and proto, none of which
have any further dependencies.


More information about the R-devel mailing list