[Rcpp-devel] Rcpp package structure

Vissarion Fisikopoulos fisikop at gmail.com
Thu Jul 12 15:32:08 CEST 2018


Hi all,

I am mentoring a gsoc project on development of a C++ library with an
R interface using Rcpp.

Currently the project has the following structure: let root be the
main folder of the package, the default Rcpp package structure is in
root/R-proj, C++ header files are in root/include and we have some
tests for the C++ functions in root/test as well as external libraries
in root/external.

The package can be installed successfully without any problems (since
in makevars we include all the files from root/include) but if we run
devtools::check() in root/R-proj, it returns an error because it seems
that it is not able to see files outside R package main folder which
is root/R-proj.

It seems that devtools expect to have C++ sources inside root/R-proj
but then either we mix the C++ sources with the R interface or we keep
two copies of the C++ sources (one inside R-proj and one outside).
Since both solutions seem problematic to me I would like to ask what
is the recommended structure for such a project?

Thanks and best regards,
Vissarion.


More information about the Rcpp-devel mailing list