Skip to content

[R-pkg-devel] structure of R package

2 messages · Τόλης Χαλκής, Duncan Murdoch

#
Dear all,

this period i am working on a gsoc project. We develop a c++ library with a
R interface using Rcpp and we plan to submit it to CRAN. We use the default
Rcpp package structure in a folder /root/R-proj. The c++ headers files are
into a folder /root/include outside the R-proj folder. In /root/R-proj/src
we have he .cpp main file and in makevars we include all the files from
/root/include.

The package can be installed successfully without any problem but if we run
devtools::check() in /root/R-poj , 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.

Question: Is this ok or we have to change our package structure and add
include folder into /root/R-proj?

Thanks in advance,

Tolis.
2 days later
#
On 10/07/2018 9:48 AM, ????? ?????? wrote:
Yes, you need to do the latter, or (if the headers are for standard 
libraries that users should obtain elsewhere) add a configure script so 
that R can find them on a user's system, and note the requirement in the 
DESCRIPTION file SystemRequirements field.  It's better if the .tar.gz 
file is self-contained.

Duncan Murdoch