[Rd] function not in load table

Toralf Kirsten tkirsten at izbi.uni-leipzig.de
Tue Jun 22 18:52:51 CEST 2004


Hi,
I apologize for this often/old question. I found some hints but couldn't 
solve the problem so far.

I have C functions (incl. the header files) as well as the R wrapper 
functions which I want to use for faster calculations. These functions 
are included in a R package.
The installation process seems to be ok (no errors). I also can load the 
package without errors. But when I call the function I got the following 
error
 > wy.result <- wy.grps(data1=X1, grpdata=groups, nres=10000, 
alpha1=0.05, alpha2=0.05)
Error in .C("wy_grps_R", as.double(X), as.integer(n1), as.integer(n2),  :
         C function name not in load table
Execution halted

The parameter are
data1 - result of read.table()
grpdata - dito
nres - integer
alpha1 nad alpha1 - factors (float)

In the R function wy.grps(...) the C function is called by using the 
statement

result <- .C("wy_grps_R",
              as.double(X),
              as.integer(n1),
              as.integer(n2),
              as.integer(p),
              as.integer(unlist(grpidx)),
              as.integer(grplen),
              as.integer(grpnum),
              as.character(WYFUN),
              as.double(alpha2),
              as.character(MINMAXFUN),
              WYdist=double(nres),
              as.integer(nres),
              test.value=double(grpnum),
              p.value=double(grpnum))


My .First.lib.R is as follows:
.First.lib <- function(libname, pkgname) {
   library.dynam("izbi", package = pkgname, lib.loc = libname)
   data(COLS, package=pkgname)
   data(ROWS, package=pkgname)
   if (exists(".Dyn.libs")) remove(".Dyn.libs")
   if (interactive() && getenv("DISPLAY") != "") x11()
}

I read something about R_CMethodDef in "Writing R Extensions" but I'm 
not really sure where I should write it, may in the .First.lib.R or in a 
separate file?
Any other possible mistakes?

We are using R 1.9.0 on Fedora Linux.

Thanks a lot, Toralf



More information about the R-devel mailing list