[Rcpp-devel] Package RMD check warning

Zheng, Binghan zheng.b at wustl.edu
Mon Jan 30 19:11:10 CET 2023


Hi,

I’m preparing a package to be released through CRAN for Dr. Jacob Montgomery at WUSTL and I’m running into a warning that I can’t seem to resolve.

The RCMD check is being run in R 4.2.2 on MacOS.
After running devtools::check() on the labelR package, it returns this warning:
 checking dependencies in R code ... WARNING
  'loadNamespace' or 'requireNamespace' call not declared from: ‘Rcpp’
  Package in Depends field not imported from: ‘methods’
    These packages need to be imported from (in the NAMESPACE file)
    for when this namespace is loaded but not attached.

@imports ‘Rcpp’ has been included in all relevant functions
It is currently in the scripts as requireNamespace(“Rcpp”) since we are using requireNamespace(“rstan”). We have tried loadNamespace(“Rcpp”) which did not resolve the issue.
Imports(‘Rcpp’) is within NAMESPACE.
Within the DESCRIPTION file, Rcpp is under Imports. We have tried moving it to Suggests, but that also did not resolve the issue. It’s unclear what the error is stemming from and we would appreciate any input to resolve this warning.

Thank you,

Bingham


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20230130/efd830b6/attachment-0001.html>


More information about the Rcpp-devel mailing list