[Rd] Package dependencies and imports

John Fox jfox at mcmaster.ca
Thu Sep 21 17:22:17 CEST 2006

Dear list members,

I'm encountering the following problem with package dependencies and

The Rcmdr package doesn't declare a formal dependency (via depends or
suggests in the package DESCRIPTION) on the rgl package because the latter
apparently causes problems on some systems. This allows the Rcmdr package to
build and check on systems without rgl present; if rgl isn't present, then
menu items using it are disabled (in the development version of the Rcmdr
package, not installed in the first place). 

If rgl is present, however, the Rcmdr package uses some unexported functions
in it. I've done this via rgl::: to avoid importing from the rgl namespace:
Because rgl isn't declared as a dependency, I can't import its namespace. In
the current R 2.4.0 alpha and R 2.5.0 devel, however, using rgl::: generates
a warning when the package is checked.

Is there a way around this short of literally copying the unexported
functions in rgl that Rcmdr uses?


John Fox
Department of Sociology
McMaster University
Hamilton, Ontario
Canada L8S 4M4

More information about the R-devel mailing list