2

Referring to Writing R package that call Fortran library,

I have a very similar issue with my R package installation. I did install the package, but got an error in R after calling the library:

library(NEpidemic)

random_epi()

Error in .Fortran("random_epi", : "random_pi" not resolved from current namespace (NEpidemic)

Then I tried the same way as mentioned in the post by Ignacio, by adding useDynLib(random_epi) in the namespace file. But it gave an error saying that it couldn't install my package. Error:

Error in library.dynam(lib, package, package.lib) : shared object ‘random_epi.so’ not found

Error: loading failed

I could see the .so file for the package name, i.e. NEpidemic.so, but not for the subroutine codes in SRC folder. I can see only random_epi.o

Community
  • 1
  • 1
Vineetha
  • 157
  • 1
  • 2
  • 13

1 Answers1

1

Fixed this issue. Edited namespace file.

Refer: http://comments.gmane.org/gmane.comp.lang.r.mac/9789

Vineetha
  • 157
  • 1
  • 2
  • 13