All, I have a question about referring to a subroutine that is in a dynamic library other than the one in my current package. Let's say that I have a package foo and it has some FORTRAN code that contains the subroutines foo1 and foocommon. The package foo has an R function that calls foo1 and foocommon is a subroutine that is called from foo1. And, I have another package called bar which also has some FORTRAN code that contains the subrouting bar1. But bar1 also calls foocommon. The bar package is distinctly different from foo, but would require foo (even if the FORTRAN code did not have the common subroutine).
I can think of a few ways to resolve this. 1. Place a copy of foocommon.f into the shared library for bar. 2. Put all of the FORTRAN code into the foo package and just rely on the R code in bar to call the code that it needs. 3. Refer to the shared library in the bar package. I assume that I'd do this in the NAMESPACE file using useDynLib(foo) in addition to useDynLib(bar), but I found no reference to it in Writing R extensions. Is there a recommended way to solve this issue? Thanks. Dave [[alternative HTML version deleted]] ______________________________________________ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel