[R-pkg-devel] User defined RNG and code registration.

Duncan Murdoch murdoch@dunc@n @end|ng |rom gm@||@com
Sat Sep 23 12:00:56 CEST 2023


On 23/09/2023 4:42 a.m., Ralf Stubner wrote:
> Hi everybody,
> 
> Section 5.4 of WRE suggests to use `R_useDynamicSymbols(dll, FALSE);`
> when registering C/C++ routines in R packages, and Rcpp does so
> automatically. ?Random.user describes a way to hook a user- defined
> RNG into R. However, it looks like these two things are not
> compatible, i.e. `user_unif_rand` et al. are not found, if dynamic
> symbols are not allowed. Or can one register these routines somehow
> even though they are not following one of the standard calling
> conventions?

I don't know the answer here, but section 6.16 of WRE suggests that you 
could explicitly make your functions visible even if they default to 
invisible.

Duncan Murdoch



More information about the R-package-devel mailing list