Skip to content
Prev 46717 / 63424 Next

declaring package dependencies

On 9/13/2013 12:15 PM, John Fox wrote:
Well, here's the rub: vcdExtra uses MASS::loglm() in examples, and also 
in R code,
where it provides new S3 methods for loglm objects.  And, this whole 
problem only arose
after vcd (on which I Depend), modified its Imports to:

Imports: utils, MASS, grDevices, colorspace
where, previously, MASS had been a Depends (or Suggests?) there.


For my examples, the old Suggests: MASS worked, but now I've used 
require(MASS) in
each of those examples.  However, the use in R code also triggered an 
error on loglm, even
when I added
Enhances: MASS
to DESCRIPTION.

OK, so I switched to using
Imports: MASS
but even that doesn't cure the problem alone.  I then got:

* checking dependencies in R code ... NOTE
Namespace in Imports field not imported from: 'MASS'
   All declared Imports should be used.
See the information on DESCRIPTION files in the chapter 'Creating R
packages' of the 'Writing R Extensions' manual.

but then an Error when an example using the function which called loglm()
directly was run.
1   model.string:  = Class
Error in eval(expr, envir, enclos) : could not find function "loglm"
Calls: seq_loglm -> eval -> eval
Execution halted


So, as several people have suggested, I changed to use MASS::loglm() in 
code,
though it still perplexes me why this is necessary.  At any rate, this 
now passes R devel.
Whew!


Thanks to a suggestion from Mattew Dowle, I'm now using winbuilder (thx, 
Uwe for this!)
and can get rather quick (< 30 min.) feedback on an R-devel build, 
whereas the
R-Forge build cycle often takes a day.

So, my workflow is  now
- R CMD check on local version in StatET
- If OK, send to winbuilder, http://win-builder.r-project.org/upload.aspx
- If OK, commit to R-Forge, and perhaps submit to CRAN if this is the 
final rev
in a development cycle.

But I still feel like I'm spending too much time on satisfying the 
unknown, new
requirements of CRAN checks.  As Dirk said (also deserving to be a fortune),
The effort by R Core members that goes into R and CRAN is certainly 
herculean and I
appreciate it very much.  Like Dirk, I'm just looking for a little more 
predictability as
CRAN evolves.

Thread (28 messages)

Michael Friendly declaring package dependencies Sep 12 Paul Gilbert declaring package dependencies Sep 12 Duncan Murdoch declaring package dependencies Sep 12 Michael Friendly declaring package dependencies Sep 13 Duncan Murdoch declaring package dependencies Sep 13 Dirk Eddelbuettel Fortune! (Re: declaring package dependencies) Sep 13 Dirk Eddelbuettel declaring package dependencies Sep 13 Brian Ripley declaring package dependencies Sep 13 Duncan Murdoch declaring package dependencies Sep 13 Duncan Murdoch declaring package dependencies Sep 13 Dirk Eddelbuettel declaring package dependencies Sep 13 Paul Gilbert declaring package dependencies Sep 13 Dirk Eddelbuettel declaring package dependencies Sep 13 John Fox declaring package dependencies Sep 13 Gray Calhoun declaring package dependencies Sep 13 Achim Zeileis Fortune! (Re: declaring package dependencies) Sep 14 Duncan Murdoch declaring package dependencies Sep 14 Dirk Eddelbuettel declaring package dependencies Sep 14 Brian G. Peterson declaring package dependencies Sep 14 Paul Gilbert declaring package dependencies Sep 14 Duncan Murdoch declaring package dependencies Sep 14 Duncan Murdoch declaring package dependencies Sep 14 Duncan Murdoch declaring package dependencies Sep 14 Dirk Eddelbuettel declaring package dependencies Sep 14 Michael Friendly declaring package dependencies Sep 15 Duncan Murdoch declaring package dependencies Sep 15 Paul Gilbert declaring package dependencies Sep 15 Brian Lee Yung Rowe declaring package dependencies Sep 15