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 | e...@debian.org
_______________________________________________
Rcpp-devel mailing list
Rcpp-devel@lists.r-forge.r-project.org
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel

Reply via email to