Depends:
R (>= 2.13.0),
ggplot2 (>= 0.8.9),
RColorBrewer,
gridExtra,
MASS
As an alternative to Depends, we could Import some of these packages. The difference is that when a package is imported, it would be available to granovaGG, but it wouldn't mask other functions in the global namespace.
I think many of these dependencies would be better served as Imports, and some are entirely unnecessary. Some packages, like RColorBrewer, bring a bunch of functions into the global namespace just so our package can use one. Other packages, like MASS, don't seem to get called at all. Ever. I propose that we could rewrite our Depends section like this:
It still makes sense to me to depend on ggplot2, since that will make a bunch of plot customization functions available in the global namespace. And it makes sense to me to be explicit about the fact that we use some plyr functions. But I think it would be cleaner and kinder to our users not to litter their global namespace with functions they probably won't use and we definitely won't use.
I also think we should remove the import(ggplot2) call from NAMESPACE, since I believe it's redundant with the dependency.
Currently, we state dependencies upon a number of other packages:
As an alternative to
Depends
, we couldImport
some of these packages. The difference is that when a package is imported, it would be available to granovaGG, but it wouldn't mask other functions in the global namespace.I think many of these dependencies would be better served as
Imports
, and some are entirely unnecessary. Some packages, likeRColorBrewer
, bring a bunch of functions into the global namespace just so our package can use one. Other packages, likeMASS
, don't seem to get called at all. Ever. I propose that we could rewrite ourDepends
section like this:It still makes sense to me to depend on
ggplot2
, since that will make a bunch of plot customization functions available in the global namespace. And it makes sense to me to be explicit about the fact that we use someplyr
functions. But I think it would be cleaner and kinder to our users not to litter their global namespace with functions they probably won't use and we definitely won't use.I also think we should remove the
import(ggplot2)
call fromNAMESPACE
, since I believe it's redundant with the dependency.References
http://stackoverflow.com/questions/6427501/cleaning-up-function-list-in-an-r-package-with-lots-of-functions/6428002#6428002 http://cran.r-project.org/doc/manuals/R-exts.html#Package-namespaces