[Rd] 'library' or 'require' call not declared from: 'rgl'

Martyn Plummer plummerm at iarc.fr
Fri Oct 31 12:29:38 CET 2014

On Thu, 2014-10-30 at 17:18 -0400, Michael Friendly wrote:
> On 10/30/2014 4:19 PM, Simon Urbanek wrote:
> > Did you intend rgl to be optional? If so, then you should use
> Suggests: instead. When you use Imports: it will load rgl
> automatically so require() does't make sense (since it will be always
> TRUE).
> >
> I always had it as Suggests: rgl before.  But R-devel now gave be all 
> those "no visible global function definition for ..."
> messages.
> Achim suggested using explicitly rgl:: everywhere.  That's quite ugly, 
> but seems to work.

I think you do want "Depends" rather than "Suggests" here. "Suggests" is
for when the other package does not need to be loaded for the user to
use your package, but the other package might be used in an example or

In your package, the default method for a generic function that your
package defines calls functions from rgl. To me that means rgl should be
in "Depends", and the required functions from rgl should be imported in
the NAMESPACE file.


This message and its attachments are strictly confidenti...{{dropped:8}}

More information about the R-devel mailing list