|
I want to build a R package in Mac with several C functions. I am using Mac OS X 10.5.8
My program works well without a package, i.e., I used R CMD SHLIB to compile my C functions, the main one is void foo( .... ) and I used dyn.load("foo.so"), and I have a R function footest.R which calls the C function foo.c and everything works fine.
However, when I tried to build a package, after R CMD check fooRtest, it gives me the following error message, (fooRtest is the package name of mine)
"footest: no visible binding for global variable 'foo'
* checking Rd files ... ERROR"
I continued with R CMD INSTALL fooRtest. Then in R, when I use "library(fooRtest)" and call the function footest in R, I got the following error message in R:
"Error in footest(Y, theta.fix = theta.fix, a.ini = a.true, b.ini = b.true, :
object 'foo' not found"
Is there anyone could tell me what is going wrong? The message in " " are the error messages.
Thanks
|