How to register own programs with Rcpp?

I am writing a Bioconductor package. To do this, he needs to pass BiocCheck .

I use Rcpp and Rstudio to make C ++ code available to R using tags //[[Rcpp::export]]and Rcpp, not SEXP. Rstudio automatically creates Rcpp_export.cpp and Rcpp_export.R and works fine.

However, BiocCheck complains about this:

Checking the registration of the native program.

Register your own routines! see        http://cran.r-project.org/doc/manuals/R-exts.html#Registering-native-routines

So, does anyone know how to solve this?

+4
source share
2 answers

- Rcpp BiocCheck. Rcpp 0.12.9, BiocCheck 1.9.3 Kmisc 0.5.1.

1) Rcpp "RcppExports.cpp" "//[[register]]" :

// my_function
returntype my_function(...);
// [[register]]
RcppExport SEXP packagename_my_function(...) {
BEGIN_RCPP
...
END_RCPP
}

2) R

Kmisc::registerFunctions(prefix="")

"packagename_init.c"

3) ,

useDynLib(packagename, .registration=TRUE)

NAMESPACE. .registration = TRUE . , BiocCheck.

getDLLRegisteredRoutines("packagename")
+3

, , , Bioconductor devel:

" - , ( ), Rcpp. ".

+1

All Articles