Thanks for the quick & helpful reply! The following seems to fix my problem:

1)  As advised, set

Imports: Rcpp
LinkingTo: Rcpp, RcppArmadillo

[my original version had imported RcppArmadillo in addition]

2) Delete the following line from the NAMESPACE file generated by RcppArmadillo.package.skeleton():

import(RcppArmadillo)

Now "R CMD check --as-cran" goes through without the note (or any other notes/warnings), and the package seems to work as intendend.

Thanks again & best regards,
Fabian



Am 28.08.2014 12:25, schrieb Dirk Eddelbuettel:
On 28 August 2014 at 11:10, Krueger, Fabian wrote:
| Hi,
|
| I am working on an R package that uses Rcpp and RcppArmadillo.
| Everything works fine on my PC, and I am now trying to make the package
| satisfy the formal standards for submitting to CRAN. Running "R CMD
| check --as-cran <package.name>, I get the following note: "Package in
| Depends/Imports which should probably only be in LinkingTo:
| 'RcppArmadillo'" [this is the only note, apart from the usual "new
| submission" one].
|
| Can anyone provide details on what this note means, and how to get rid

You probably have

     Depends: Rcpp, RcppArmadillo

or

     Imports: Rcpp, RcppArmadillo

when you only need

     Imports: Rcpp
     LinkingTo: Rcpp, RcppArmadillo

See eg the RcppMLPACK package as a recent example, and edit your DESCRIPTION
accordingly.

| of it? What puzzles me is that producing a toy package via
| "RcppArmadillo.package.skeleton()" yields the same note (see MWE below).

The RcppArmadillo.package.skeleton() function may need updating then with
respect to Imports -- looks like it was last touched in May.

I'll check that over the next few days.

Dirk

| My search led me to
| http://article.gmane.org/gmane.comp.lang.r.rcpp/6613/match=only+linkingto,
| as well as some release notes for Rcpp related packages that mention
| changes in NAMESPACE related issues. However, I had trouble seeing what
| these mean for my problem.
|
| I am using Windows 7 (+ Rtools, of course), R version 3.1.1,
| Rcpp_0.11.2, as well as RcppArmadillo_0.4.400.0.
|
| Thanks & best regards,
| Fabian
|
| MWE
| --------
| As a MWE (which I think/hope reproduces the issues that are relevant
| here), consider the following toy example:
|
| - Call RcppArmadillo.package.skeleton("xyz"), producing the new package
| folder "xyz"
| - Add formally correct documentation files to folder "xyz/man" (that is,
| add entries for all exported functions and the package itself; delete
| between-text comments produced by skeleton function).
| - Add license information to file "xyz/DESCRIPTION": "License: GPL (>= 2)"
|
| Running "R CMD check xyz" goes through without any notes or warnings.
| Running "R CMD check --as-cran xyz" yields the exact same note as above
| (plus the "new submission" note), but no other notes/warnings. [I did
| not post the fake docu files for package "xyz" to avoid spamming - if
| anyone wants them, pls let me know]
| _______________________________________________
| Rcpp-devel mailing list
| Rcpp-devel@lists.r-forge.r-project.org
| https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel


_______________________________________________
Rcpp-devel mailing list
Rcpp-devel@lists.r-forge.r-project.org
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel

Reply via email to