From edd @ending from debi@n@org  Sat Nov  3 20:07:28 2018
From: edd @ending from debi@n@org (Dirk Eddelbuettel)
Date: Sat, 3 Nov 2018 14:07:28 -0500
Subject: [Rd] odd NOTE in R CMD check of data; Rcpp module related
In-Reply-To: <CANtt_hzK=ennE6Ro5k2FCgq2GOFxjj27zGPLXimxdtU7LfNqDg@mail.gmail.com>
References: <CANtt_hzK=ennE6Ro5k2FCgq2GOFxjj27zGPLXimxdtU7LfNqDg@mail.gmail.com>
Message-ID: <23517.61936.711679.449180@rob.eddelbuettel.com>


Robert,

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 

  https://github.com/ncss-tech/soilDB/blob/master/DESCRIPTION

you may need to import the 'methods' package.  I see that

  https://github.com/green-striped-gecko/PopGenReport/blob/master/DESCRIPTION

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.

Dirk

-- 
http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org



[Rd] odd NOTE in R CMD check of data; Rcpp module related
Dirk Eddelbuettel