[Rcpp-devel] Error: .onLoad failed in loadNamespace()

Laurent Gatto lg390 at cam.ac.uk
Fri May 27 18:17:51 CEST 2011

Dear all,

A basic packages with Rcpp modules produces the warning described
below, that I would ideally, with your help, get rid of.

Rscript -e "require(Rcpp); Rcpp.package.skeleton(module=FALSE)"
R CMD check anRpackage

produces obvious warnings related to badly formatted documentation and
license. However

Rscript -e "require(Rcpp); Rcpp.package.skeleton(module=TRUE)"
R CMD check anRpackage

produces this additional warning that puzzles me:

[ ...checker output... ]
* checking whether the name space can be loaded with stated
dependencies ... WARNING
Error: .onLoad failed in loadNamespace() for ‘anRpackage’, details:
  call: value[[3L]](cond)
  error: failed to load module yada from package anRpackage
Execution halted

A namespace must be able to be loaded with just the base namespace
loaded: otherwise if the namespace gets loaded by a saved object, the
session will be unable to start.

Probably some imports need to be declared in the NAMESPACE file.
[ ...checker output...]

I suspect this may be related to the yada module not being exposed and
thus not available when the package is loaded. Any further explanation
or hints would however be warmly appreciated.

sessionInfo() is appended below.

Thank you very much in advance.

Best wishes,


> sessionInfo()
R version 2.14.0 Under development (unstable) (2011-05-04 r55760)
Platform: x86_64-unknown-linux-gnu (64-bit)

 [1] LC_CTYPE=en_GB.utf8       LC_NUMERIC=C
 [3] LC_TIME=en_GB.utf8        LC_COLLATE=en_GB.utf8
 [5] LC_MONETARY=C             LC_MESSAGES=en_GB.utf8
 [7] LC_PAPER=en_GB.utf8       LC_NAME=C
 [9] LC_ADDRESS=C              LC_TELEPHONE=C

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

other attached packages:
[1] Rcpp_0.9.4.1

More information about the Rcpp-devel mailing list