[R] loading multiple C files to R

Jin Shusong jinss at hkusua.hku.hk
Tue Jun 15 11:26:26 CEST 2004


On Tue, Jun 15, 2004 at 01:43:21AM -0700, Utsav Boobna wrote:
> Hi,
>    I am willing to load multiple C files to R, which
> are inter-dependent (functions used in one may be
> defined in other). What I was trying is to first
> compile all of them separately (using R CMD SHLIB ...)
> and then load them one by one (using dyn.load("...")
> ), but  it doesnt work (which seems to be obvious).
> During loading, it was unable to recognize the
> functions declared in already loaded file.
> 
> Please help.
> Is there any documentation available on this topic,
> other than "Writing R extensions"?
> 
> Thanks,
> Utsav
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Dear Utsav,

  I think that you missed an option in dyn.load().
You can load your program by
dyn.load("your.program",local=FALSE)

  Good luck.

  Jin




More information about the R-help mailing list