[R-pkg-devel] use of getNativeSymbolInfo

Tomas Kalibera tom@@@k@||ber@ @end|ng |rom gm@||@com
Tue Mar 24 15:28:01 CET 2020


On 2/9/20 5:14 PM, Benjamin Tyner wrote:
> Hello,
>
> Using package nlme as an example, where there is a registered routine 
> fit_gnls:
>
> > library(nlme)
> > getDLLRegisteredRoutines("nlme")$.C$fit_gnls
> $name
> [1] "fit_gnls"
>
> $address
> <pointer: 0x55f8f99a93c0>
> attr(,"class")
> [1] "RegisteredNativeSymbol"
>
> $dll
> DLL name: nlme
> Filename: /home/btyner/R-77784/lib/R/library/nlme/libs/nlme.so
> Dynamic lookup: FALSE
>
> $numParameters
> [1] 10
>
> attr(,"class")
> [1] "CRoutine"         "NativeSymbolInfo"
>
> However when I tried this,
>
> > getNativeSymbolInfo(name = "fit_gnls", PACKAGE = "nlme")
>
> it says:
>
> Error in FUN(X[[i]], ...) : no such symbol fit_gnls in package nlme
>
> so I am wondering what I'm doing wrong...

This is because it is not allowed by the package: nlme calls 
R_forceSymbols(,TRUE) in its init function.

Tomas

>
> Regards,
> Ben
>
> ______________________________________________
> R-package-devel using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel



More information about the R-package-devel mailing list