From vograno at evafunds.com  Tue Jun 22 19:22:29 2004
From: vograno at evafunds.com (Vadim Ogranovich)
Date: Tue Jun 22 19:22:56 2004
Subject: [Rd] function not in load table
Message-ID: <C698D707214E6F4AB39AB7096C3DE5A5568A3A@phost015.EVAFUNDS.intermedia.net>

.C has a named argument 'PACKAGE', which you didn't set. I usually have
such an error when I forget about the argument. 

> -----Original Message-----
> From: r-devel-bounces@stat.math.ethz.ch 
> [mailto:r-devel-bounces@stat.math.ethz.ch] On Behalf Of Toralf Kirsten
> Sent: Tuesday, June 22, 2004 9:53 AM
> To: r-devel@stat.math.ethz.ch
> Subject: [Rd] function not in load table
> 
> 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
> 
> ______________________________________________
> R-devel@stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-devel
> 
>


[Rd] function not in load table
Vadim Ogranovich