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

2014-10-31 Thread Martyn Plummer
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
vignette.

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.

Martyn

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

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


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

2014-10-30 Thread Michael Friendly
I'm checking a new release of vcdExtra via win builder with R-devel 
2014-10-29 r66897

and have run into a Warning I don't know how to fix.

I have one S3 generic, mosaic3d() that uses rgl and don't want to have 
rgl always loaded

via Depends:.  Instead, the mosaic3d.default() method includes

  if (!require(rgl)) stop(rgl is required)

This always worked in the past, but in this testing cycle, I got a slew 
of no visible global function definition for ...

all rgl functions.

I revised DESCRIPTION to include:

Imports:  rgl

and NAMESPACE:

import(rgl)

All the no visible global function definition ... went away, but I'm 
stuck with


* checking dependencies in R code ... WARNING
'library' or 'require' call not declared from: 'rgl'
See the information on DESCRIPTION files in the chapter 'Creating R
packages' of the 'Writing R Extensions' manual.

How can I solve this?

--
Michael Friendly Email: friendly AT yorku DOT ca
Professor, Psychology Dept.  Chair, Quantitative Methods
York University  Voice: 416 736-2100 x66249 Fax: 416 736-5814
4700 Keele StreetWeb:http://www.datavis.ca
Toronto, ONT  M3J 1P3 CANADA

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


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

2014-10-30 Thread Simon Urbanek

 On Oct 30, 2014, at 3:11 PM, Michael Friendly frien...@yorku.ca wrote:
 
 I'm checking a new release of vcdExtra via win builder with R-devel 
 2014-10-29 r66897
 and have run into a Warning I don't know how to fix.
 
 I have one S3 generic, mosaic3d() that uses rgl and don't want to have rgl 
 always loaded
 via Depends:.  Instead, the mosaic3d.default() method includes
 
  if (!require(rgl)) stop(rgl is required)
 
 This always worked in the past, but in this testing cycle, I got a slew of 
 no visible global function definition for ...
 all rgl functions.
 
 I revised DESCRIPTION to include:
 
 Imports:  rgl
 
 and NAMESPACE:
 
 import(rgl)
 
 All the no visible global function definition ... went away, but I'm stuck 
 with
 
 * checking dependencies in R code ... WARNING
 'library' or 'require' call not declared from: 'rgl'
 See the information on DESCRIPTION files in the chapter 'Creating R
 packages' of the 'Writing R Extensions' manual.
 
 How can I solve this?
 

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

Cheers,
Simon


 -- 
 Michael Friendly Email: friendly AT yorku DOT ca
 Professor, Psychology Dept.  Chair, Quantitative Methods
 York University  Voice: 416 736-2100 x66249 Fax: 416 736-5814
 4700 Keele StreetWeb:http://www.datavis.ca
 Toronto, ONT  M3J 1P3 CANADA
 
 __
 R-devel@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-devel
 

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


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

2014-10-30 Thread Michael Friendly

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.


--
Michael Friendly Email: friendly AT yorku DOT ca
Professor, Psychology Dept.  Chair, Quantitative Methods
York University  Voice: 416 736-2100 x66249 Fax: 416 736-5814
4700 Keele StreetWeb:http://www.datavis.ca
Toronto, ONT  M3J 1P3 CANADA

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel