[R] C function name garbled

S Blay sblay at sfu.ca
Tue Sep 7 21:46:55 CEST 2004


I wrote an R wrapper function (phylpro) around a C function 
(Rphylpro).
The first time I'm running my function, it runs with no errors.
The second time I'm trying to run it, I get an error message 
with the first argument to .Call garbled.

Set up:
> dyn.load("Phylpro.so")
> source("phylpro.R")
> WinHalfWidth<-30
> permReps<-10
> breaks<-c(548, 735, 832)

First call to phylpro succeeds:
> b<-phylpro("simulinfile", breaks, WinHalfWidth, permReps)
>

Second call to phylpro fails:
> b<-phylpro("simulinfile", breaks, WinHalfWidth, permReps)
Error in .Call("PSg\bBh\b", input_file = 
as.character(input_file), breaks = as.integer(breaks),  : 
        .Call function name not in load table

Check if my C function name is in load table: 
> is.loaded("Rphylpro")
[1] TRUE


Any ideas?
Thanks for your help,

S. Blay
Department of Statistics and Actuarial Science
Simon Fraser University, Vancouver, British Columbia




More information about the R-help mailing list