The error message suggests that something goes wrong with the Rcpp module
that raster is using. The module was newly introduced, and coincides with
this new behavior. Do you have any idea about what I could do to avoid this?
This behavior can be simply simulated by creating a new RasterLayer, saving
it, and loading it in a fresh session.
x <- raster(ncol=10, nrow=10, vals=1:100)
--- new R session ---
Loading required package: raster
Loading required package: sp
Error: package or namespace load failed for ‘raster’ in
error in load action .__A__.1 for package raster: loadModule(module =
"spmod", what = TRUE, env = ns, loadNow = TRUE): Unable to load module
"spmod": object of type 'closure' is not subsettable
Error in .requirePackage(package) :
unable to find required package ‘raster’
Re: odd NOTE in R CMD check of data; Rcpp module related
On 3 November 2018 at 10:29, Robert J. Hijmans wrote:
| With the current version of the "raster" package (that I maintain), R CMD
| check on packages "soilDB" and "PopGenReport" have this NOTE:
| Package: soilDB
| Check: data for non-ASCII characters
| New result: NOTE
| Error in .requirePackage(package) :
| unable to find required package 'raster'
| Calls: <Anonymous> ... .findInheritedMethods -> getClass -> getClassDef
| -> .requirePackage
| Execution halted
| Any idea about what I can do to get rid of this?
Shooting a little from the hip, but based on the error and a glance at
has it (and also a corresponding `importFrom(methods,as)`. I think I usually
deploy a more global 'import(methods)'. This is needed because Rcpp Modules
does some black magic on the package setup to make everything that needs to
be visible effectively visible.
One way to go about this is to create a minimal package using Rcpp Modules,
and to then make sure you carry each setting of the minimal package over into
your actual package -- that would usually involve imports and declaration.