[Rcpp-devel] Rcpp shared libraries (?)

Dirk Eddelbuettel edd at debian.org
Thu Jun 23 17:57:38 CEST 2022


One belated follow-up:  one can in general control visibility so

- a function can be in C(++) and used by other C(++) functions
  (and we have examples)

- a function can be exported to R easily via [[Rcpp::export()]] thanks to
  magic of Rcpp::compileAttributes()

- a function can also be "privatedly" exported to R using a name starting
  with a dot such as [[Rcpp::export(.myfunc)]]

- once at the R level we have the usual NAMESPACE control, also via roxygen2
  and its @export tag

When something like this seems to 'stumble' with a larger package, it is
sometimes worthwhile to experient quickly with a minimal throw-away package
as the mechanism is strictly the same and when it works for one...

Cheers, Dirk


-- 
dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org


More information about the Rcpp-devel mailing list