Tim
Tim

Reputation: 7464

Rcpp::export - exporting only the C++ interface, not the R functions

I do not need roxygen2 and Rcpp to create for me the R functions (or maybe I do?) for the exported C++ functions - is there any way to tell Rcpp::export not to create them? I would be perfectly happy with just .Call-ing them directly.

I went through Writing R Extensions, and Rcpp Attributes and Writing a package that uses Rcpp vignettes, documentation of roxygen2 and multiple threads on SO (like here) but I did not find anything helpful.

Upvotes: 0

Views: 856

Answers (1)

Dirk is no longer here
Dirk is no longer here

Reputation: 368231

If I understand your question correctly, then it is as simple "well if you don't want a stub function created, do no put an [[Rcpp::export]] tag there".

You also confuse what roxygen2 does for documentation with what the compileAttributes() function does for exporting.

To be plain, only the latter has anything to do with creating interfaces between R and C++. And on the margin, you do want them for the free exception handling and RNG setting they give you. But hey, if you'd rather do without, you can, and that is documented.

Upvotes: 2

Related Questions