[R] question about loading shared objects into R

Gideon Magnus gfmagnus at uchicago.edu
Fri Feb 9 04:20:20 CET 2007


Hi

I am running the latest version of R on MacOS X. I have the following  
problem:

I create a .so file (using C code) with R CMD SHLIB and then load it  
into R using dyn.load. So far no problem at all. However, if I want  
to change the content of the library this is difficult. If I first  
unload the library in R, then change the code, delete the old .so  
file, then recompile, then reload the library in R, I am still  
loading the old library! The only way I have been able to solve this  
is by restarting R, and then loading the new .so file.  Is there a  
remedy for this problem?

thanks a lot,

Gideon



More information about the R-help mailing list