[R] Neophyte question re using dyn.load and accessing c functions
Barnet Wagman
wagman at enteract.com
Sun Apr 25 20:41:38 CEST 1999
I'm have what's probably a trivial &| silly problem trying to access a
c-function in a shared
library ( R 0.64, under redhat linux 5.2).
R COMPILE rctest.c
R SHLIB -o libRC.so rctest.o
produce a reasonable looking shared library ('nm libRC.so' shows that
the function 'rctest' is present).
In R, the command
dyn.load("/fullpathname/libRC.so")
returns without an error. However, I'm unable to access the function.
E.g.
is.loaded(symbol.C("rctest"))
yields FALSE.
.C("rctest",x)
yields "Error in .C("rctest", x) : C/Fortran function not in load table"
There must be something I'm leaving out, but after searching the
documentation and
help archive, I'm stuck. Does the .so have to be in an R package (if
so, where)?
Thanks,
-------------------
Barnet Wagman
wagman at enteract.com
773-645-8369
1361 N. Hoyne
Chicago, IL 60622
--------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://stat.ethz.ch/pipermail/r-help/attachments/19990425/efb04208/attachment.html
More information about the R-help
mailing list